Skip to main content
Home
Works with
This package works with BunIt is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score76%
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.ts file and define your config
  • compile the config file to bunfig.toml using bjs-config cli
  • run your bun app

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@bjs/config

Import symbol

import * as config from "@bjs/config";
or

Import directly with a jsr specifier

import * as config from "jsr:@bjs/config";

Add Package

pnpm i jsr:@bjs/config
or (using pnpm 10.8 or older)
pnpm dlx jsr add @bjs/config

Import symbol

import * as config from "@bjs/config";

Add Package

yarn add jsr:@bjs/config
or (using Yarn 4.8 or older)
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";