mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
chore: use bacon instead of cargo watch
This commit is contained in:
parent
2e8579ce81
commit
82bc745da1
2 changed files with 26 additions and 12 deletions
14
bacon.toml
Normal file
14
bacon.toml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[jobs.example]
|
||||||
|
command = ["just", "run-example"]
|
||||||
|
allow_warnings = true
|
||||||
|
need_stdout = true
|
||||||
|
|
||||||
|
[jobs.oxlint]
|
||||||
|
command = ["cargo", "--color", "always", "run", "-p", "oxlint"]
|
||||||
|
allow_warnings = true
|
||||||
|
need_stdout = true
|
||||||
|
|
||||||
|
[jobs.wasm]
|
||||||
|
command = ["just", "build-wasm", "dev"]
|
||||||
|
allow_warnings = true
|
||||||
|
need_stdout = true
|
||||||
24
justfile
24
justfile
|
|
@ -16,7 +16,7 @@ alias new-typescript-rule := new-ts-rule
|
||||||
# or install via `cargo install cargo-binstall`
|
# or install via `cargo install cargo-binstall`
|
||||||
# Initialize the project by installing all the necessary tools.
|
# Initialize the project by installing all the necessary tools.
|
||||||
init:
|
init:
|
||||||
cargo binstall cargo-watch cargo-insta typos-cli cargo-shear dprint -y
|
cargo binstall bacon cargo-insta typos-cli cargo-shear dprint -y
|
||||||
|
|
||||||
# When ready, run the same CI commands
|
# When ready, run the same CI commands
|
||||||
ready:
|
ready:
|
||||||
|
|
@ -42,15 +42,15 @@ install-hook:
|
||||||
echo -e "#!/bin/sh\njust fmt" > .git/hooks/pre-commit
|
echo -e "#!/bin/sh\njust fmt" > .git/hooks/pre-commit
|
||||||
chmod +x .git/hooks/pre-commit
|
chmod +x .git/hooks/pre-commit
|
||||||
|
|
||||||
# --no-vcs-ignores: cargo-watch has a bug loading all .gitignores, including the ones listed in .gitignore
|
watch:
|
||||||
# use .ignore file getting the ignore list
|
bacon
|
||||||
# Run `cargo watch`
|
|
||||||
watch command:
|
|
||||||
cargo watch --no-vcs-ignores -i '*snap*' -x '{{command}}'
|
|
||||||
|
|
||||||
# Run the example in `parser`, `formatter`, `linter`
|
# Run the example in `parser`, `formatter`, `linter`
|
||||||
example tool *args='':
|
example tool *args='':
|
||||||
just watch 'run -p oxc_{{tool}} --example {{tool}} -- {{args}}'
|
cargo --color always run -p oxc_{{tool}} --example {{tool}} -- {{args}}
|
||||||
|
|
||||||
|
watch-example args='':
|
||||||
|
bacon example -- {{args}}
|
||||||
|
|
||||||
# Generate AST related boilerplate code.
|
# Generate AST related boilerplate code.
|
||||||
# Run this when AST definition is changed.
|
# Run this when AST definition is changed.
|
||||||
|
|
@ -101,14 +101,14 @@ coverage:
|
||||||
conformance *args='':
|
conformance *args='':
|
||||||
cargo coverage -- {{args}}
|
cargo coverage -- {{args}}
|
||||||
|
|
||||||
# Watch oxlint
|
|
||||||
watch-oxlint *args='':
|
|
||||||
just watch 'run -p oxlint -- {{args}}'
|
|
||||||
|
|
||||||
# Build oxlint in release build
|
# Build oxlint in release build
|
||||||
oxlint:
|
oxlint:
|
||||||
cargo oxlint
|
cargo oxlint
|
||||||
|
|
||||||
|
# Watch oxlint
|
||||||
|
watch-oxlint *args='':
|
||||||
|
bacon oxlint -- {{args}}
|
||||||
|
|
||||||
# Get code coverage
|
# Get code coverage
|
||||||
codecov:
|
codecov:
|
||||||
cargo codecov --html
|
cargo codecov --html
|
||||||
|
|
@ -132,7 +132,7 @@ install-wasm:
|
||||||
cargo binstall wasm-pack
|
cargo binstall wasm-pack
|
||||||
|
|
||||||
watch-wasm:
|
watch-wasm:
|
||||||
cargo watch --no-vcs-ignores -i 'npm/oxc-wasm/**' -- just build-wasm dev
|
bacon wasm
|
||||||
|
|
||||||
build-wasm mode="release":
|
build-wasm mode="release":
|
||||||
wasm-pack build --out-dir ../../npm/oxc-wasm --target web --{{mode}} --scope oxc crates/oxc_wasm
|
wasm-pack build --out-dir ../../npm/oxc-wasm --target web --{{mode}} --scope oxc crates/oxc_wasm
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue