You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thinking about contributing? - All pull requests and issues are welcome and I will work with you to attempt to resolve them in a resonable amount of time.
4
+
5
+
To help with that, here are some developer notes:
6
+
7
+
## Tests
8
+
9
+
All tests for this project are ran through `nix flake check` and are a good way of checking if the whole project works. To ensure this remains the case automatically, [garnix](https://garnix.io/) has been setup for the repository to run automatically on pull requests.
10
+
11
+
## Documentation
12
+
13
+
More documentation is always welcome, if you have any ideas for anything more which could be documented do make a contribution. For now, the documentation is an [mdbook](https://rust-lang.github.io/mdBook/) in `docs/`.
14
+
15
+
## Formatting
16
+
17
+
[Treefmt](https://github.com/numtide/treefmt-nix) has been setup for this repo to keep code styling clean and git diffs as small as possible, it is checked for automatically, but please remember to run `nix fmt` before making a pull request.
Bun2nix is a fast rust based tool for converting lockfiles generated with the [JavaScript](https://en.wikipedia.org/wiki/JavaScript)[Bun](https://bun.sh/) (v1.2+) package manager files to [Nix](https://nixos.wiki/) expressions, which allows them to be consumed to build Bun packages reproducibly.
Copy file name to clipboardExpand all lines: docs/src/using-the-command-line-tool.md
+5-34Lines changed: 5 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,47 +12,18 @@ The recommended way to use `bun2nix` is by adding it to your `package.json` to a
12
12
13
13
However, if you run without the `-o` flag it will produce a text output over stdout similar to other `lang2nix` tools, hence if you enforce formatting rules in your repository it is likely a good idea to pass it through a formatter before writing the file.
14
14
15
-
## Cache
16
-
17
-
`bun2nix` currently uses an sqlite cache for storing prefetched hashes which has to be cleared manually with `bun2nix cache clear`.
18
-
19
-
> This is likely to change soon, see [here](https://github.com/baileyluTCD/bun2nix/issues/2) for details.
20
-
21
15
## Options
22
16
23
17
Currently, the options available from the command line tool are as follows:
24
18
25
19
```
26
20
Convert Bun (v1.2+) packages to Nix expressions
27
21
28
-
Usage: bun2nix [OPTIONS] [COMMAND]
29
-
30
-
Commands:
31
-
cache Cache related subcommands
32
-
help Print this message or the help of the given subcommand(s)
22
+
Usage: bun2nix [OPTIONS]
33
23
34
24
Options:
35
-
-l, --lock-file <LOCK_FILE>
36
-
The Bun (v1.2+) lockfile to use to produce the Nix expression
37
-
38
-
[default: ./bun.lock]
39
-
40
-
-o, --output-file <OUTPUT_FILE>
41
-
The output file to write to - if no file location is provided, print to stdout instead
42
-
43
-
-c, --cache-location <CACHE_LOCATION>
44
-
The sqlite database to use as the cache - will be created if it does not exist.
45
-
46
-
Default value of <system cache directory>/bun2nix is assigned when no value is passed to `cache_location`.
47
-
48
-
[default: ~/.cache/bun2nix]
49
-
50
-
--disable-cache
51
-
Disable usage of the cache entirely
52
-
53
-
-h, --help
54
-
Print help (see a summary with '-h')
55
-
56
-
-V, --version
57
-
Print version
25
+
-l, --lock-file <LOCK_FILE> The Bun (v1.2+) lockfile to use to produce the Nix expression [default: ./bun.lock]
26
+
-o, --output-file <OUTPUT_FILE> The output file to write to - if no file location is provided, print to stdout instead
0 commit comments