latest
dspindola/bjs-configWorks with
•JSR Score76%•This package works with BunIt is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Browsers




Publisheda year ago (0.0.1)
BunJS package for generate, compile and define `bunfig.toml` files.
@bjs/config
BunJS package for generate, compile and define bunfig.toml files.
Install
bunx jsr add @bjs/config
Usage
import { defineConfig } from "@bjs/config"; // declare your definitions (optional) // next release will enable type-safety for definitions with code-gen declare const definitions: { "process.env.NODE_ENV": `${string}`; "process.env.MODE": `${string}`; }; export default defineConfig({ jsx: "react-jsx", define: define<typeof definitions>({ "process.env.NODE_ENV": `'development'`, "process.env.MODE": `'development'`, }), });
Compile
bun bjs-config compile --cwd=<path>
Steps
- create a
bun.config.tsfile and define your config - compile the config file to bunfig.toml using
bjs-configcli - run your bun app
Add Package
deno add jsr:@bjs/config
Import symbol
import * as config from "@bjs/config";
Import directly with a jsr specifier
import * as config from "jsr:@bjs/config";
Add Package
pnpm i jsr:@bjs/config
pnpm dlx jsr add @bjs/config
Import symbol
import * as config from "@bjs/config";
Add Package
yarn add jsr:@bjs/config
yarn dlx jsr add @bjs/config
Import symbol
import * as config from "@bjs/config";
Add Package
vlt install jsr:@bjs/config
Import symbol
import * as config from "@bjs/config";
Add Package
npx jsr add @bjs/config
Import symbol
import * as config from "@bjs/config";
Add Package
bunx jsr add @bjs/config
Import symbol
import * as config from "@bjs/config";