Skip to content

Commit

Permalink
chore: several minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Dec 20, 2024
1 parent 79445b1 commit 1b57da3
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .vscode/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ antfu
biomejs
booleanish
bumpp
bunfig
bunx
changelogen
changelogithub
Expand Down Expand Up @@ -30,6 +31,7 @@ Solana
Spatie
stacksjs
typecheck
unconfig
unplugin
unref
upath
Expand Down
Binary file removed bun.lockb
Binary file not shown.
11 changes: 3 additions & 8 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Install

## Bun & Node.js
## Bun

It is as simple as running the following command:

```bash
bun install -d bunfig

# or, invoke immediately
bunx bunfig
```

## Binaries

For now, you can download the `bunfig` binaries from the [releases page](https://github.com/stacksjs/bunfig/releases/tag/v0.4.0). Choose the binary that matches your platform and architecture:
34 changes: 33 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,36 @@ console.log(resolvedConfig) // { port: 3000, host: 'localhost' }, unless a confi
```

> [!TIP]
> If your process.cwd() includes a `$name.config.{ts,js,mjs,cjs}` file, it will be loaded and merged with the defaults, with file config file values taking precedence.
> If your process.cwd() includes a `$name.config.{ts,js,mjs,cjs}` file, it will be loaded and merged with the defaults, with file config values taking precedence.
## Options

### `name`

The name of your application. This is used to find the configuration file.

### `cwd`

The directory to search for the configuration file. Defaults to `process.cwd()`.

### `defaults`

The default configuration values. These will be merged with the configuration file values, with the file values taking precedence.

### `configFile`

The name of the configuration file to look for. Defaults to `$name.config.{ts,js,mjs,cjs}`.

## Configuration File

The configuration file should export an object that matches the type you provide to `Config`. For example:

```ts
// my-app.config.ts
export default {
port: 4000,
host
}
```

This file will be loaded and merged with the defaults, with the file values taking precedence.
2 changes: 1 addition & 1 deletion pkgx.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dependencies:
bun.sh: ^1.1.34
bun.sh: ^1.1.40

0 comments on commit 1b57da3

Please sign in to comment.