|
| 1 | +_default: |
| 2 | + just --list -u |
| 3 | + |
| 4 | +alias f := format |
| 5 | +alias t := test |
| 6 | +# alias r := ready |
| 7 | +# alias l := lint |
| 8 | +# alias qt := test-quick |
| 9 | + |
| 10 | +# Installs the tools needed to develop |
| 11 | +# install-tools: |
| 12 | +# cargo install cargo-binstall |
| 13 | +# cargo binstall cargo-insta taplo-cli wasm-pack wasm-tools knope |
| 14 | + |
| 15 | +# Upgrades the tools needed to develop |
| 16 | +# upgrade-tools: |
| 17 | +# cargo install cargo-binstall --force |
| 18 | +# cargo binstall cargo-insta taplo-cli wasm-pack wasm-tools knope --force |
| 19 | + |
| 20 | +# Generate all files across crates and tools. You rarely want to use it locally. |
| 21 | +# gen-all: |
| 22 | +# cargo run -p xtask_codegen -- all |
| 23 | +# cargo codegen-configuration |
| 24 | +# cargo codegen-migrate |
| 25 | +# just gen-bindings |
| 26 | +# just format |
| 27 | + |
| 28 | +# Generates TypeScript types and JSON schema of the configuration |
| 29 | +# gen-bindings: |
| 30 | +# cargo codegen-schema |
| 31 | +# cargo codegen-bindings |
| 32 | + |
| 33 | +# Generates code generated files for the linter |
| 34 | +# gen-lint: |
| 35 | +# cargo run -p xtask_codegen -- analyzer |
| 36 | +# cargo codegen-configuration |
| 37 | +# cargo codegen-migrate |
| 38 | +# just gen-bindings |
| 39 | +# cargo run -p rules_check |
| 40 | +# just format |
| 41 | + |
| 42 | +# Generates the initial files for all formatter crates |
| 43 | +# gen-formatter: |
| 44 | +# cargo run -p xtask_codegen -- formatter |
| 45 | + |
| 46 | +# Generates the Tailwind CSS preset for utility class sorting (requires Bun) |
| 47 | +# gen-tw: |
| 48 | +# bun packages/tailwindcss-config-analyzer/src/generate-tailwind-preset.ts |
| 49 | + |
| 50 | +# Generates the code of the grammars available in Biome |
| 51 | +# gen-grammar *args='': |
| 52 | +# cargo run -p xtask_codegen -- grammar {{args}} |
| 53 | + |
| 54 | +# Generates the linter documentation and Rust documentation |
| 55 | +# documentation: |
| 56 | +# RUSTDOCFLAGS='-D warnings' cargo documentation |
| 57 | + |
| 58 | +# Creates a new lint rule in the given path, with the given name. Name has to be camel case. |
| 59 | +# new-js-lintrule rulename: |
| 60 | +# cargo run -p xtask_codegen -- new-lintrule --kind=js --category=lint --name={{rulename}} |
| 61 | +# just gen-lint |
| 62 | +# just documentation |
| 63 | + |
| 64 | +# Creates a new lint rule in the given path, with the given name. Name has to be camel case. |
| 65 | +# new-js-assistrule rulename: |
| 66 | +# cargo run -p xtask_codegen -- new-lintrule --kind=js --category=assist --name={{rulename}} |
| 67 | +# just gen-lint |
| 68 | +# just documentation |
| 69 | + |
| 70 | +# Promotes a rule from the nursery group to a new group |
| 71 | +# promote-rule rulename group: |
| 72 | +# cargo run -p xtask_codegen -- promote-rule --name={{rulename}} --group={{group}} |
| 73 | +# just gen-lint |
| 74 | +# just documentation |
| 75 | +# -cargo test -p biome_js_analyze -- {{snakecase(rulename)}} |
| 76 | +# cargo insta accept |
| 77 | + |
| 78 | + |
| 79 | +# Format Rust files and TOML files |
| 80 | +format: |
| 81 | + cargo format |
| 82 | + # taplo format |
| 83 | + |
| 84 | +[unix] |
| 85 | +_touch file: |
| 86 | + touch {{file}} |
| 87 | + |
| 88 | +[windows] |
| 89 | +_touch file: |
| 90 | + (gci {{file}}).LastWriteTime = Get-Date |
| 91 | + |
| 92 | +# Run tests of all crates |
| 93 | +test: |
| 94 | + cargo test run --no-fail-fast |
| 95 | + |
| 96 | +# Run tests for the crate passed as argument e.g. just test-create pg_cli |
| 97 | +test-crate name: |
| 98 | + cargo test run -p {{name}} --no-fail-fast |
| 99 | + |
| 100 | +# Run doc tests |
| 101 | +test-doc: |
| 102 | + cargo test --doc |
| 103 | + |
| 104 | +# Tests a lint rule. The name of the rule needs to be camel case |
| 105 | +# test-lintrule name: |
| 106 | +# just _touch crates/biome_js_analyze/tests/spec_tests.rs |
| 107 | +# just _touch crates/biome_json_analyze/tests/spec_tests.rs |
| 108 | +# just _touch crates/biome_css_analyze/tests/spec_tests.rs |
| 109 | +# just _touch crates/biome_graphql_analyze/tests/spec_tests.rs |
| 110 | +# cargo test -p biome_js_analyze -- {{snakecase(name)}} --show-output |
| 111 | +# cargo test -p biome_json_analyze -- {{snakecase(name)}} --show-output |
| 112 | +# cargo test -p biome_css_analyze -- {{snakecase(name)}} --show-output |
| 113 | +# cargo test -p biome_graphql_analyze -- {{snakecase(name)}} --show-output |
| 114 | + |
| 115 | +# Tests a lint rule. The name of the rule needs to be camel case |
| 116 | +# test-transformation name: |
| 117 | +# just _touch crates/biome_js_transform/tests/spec_tests.rs |
| 118 | +# cargo test -p biome_js_transform -- {{snakecase(name)}} --show-output |
| 119 | + |
| 120 | +# Run the quick_test for the given package. |
| 121 | +# test-quick package: |
| 122 | +# cargo test -p {{package}} --test quick_test -- quick_test --nocapture --ignored |
| 123 | + |
| 124 | + |
| 125 | +# Alias for `cargo clippy`, it runs clippy on the whole codebase |
| 126 | +lint: |
| 127 | + cargo clippy |
| 128 | + |
| 129 | +# When you finished coding, run this command to run the same commands in the CI. |
| 130 | +# ready: |
| 131 | +# git diff --exit-code --quiet |
| 132 | +# just gen-all |
| 133 | +# just documentation |
| 134 | +# #just format # format is already run in `just gen-all` |
| 135 | +# just lint |
| 136 | +# just test |
| 137 | +# just test-doc |
| 138 | +# git diff --exit-code --quiet |
| 139 | + |
| 140 | +# Creates a new crate |
| 141 | +new-crate name: |
| 142 | + cargo new --lib crates/{{snakecase(name)}} |
| 143 | + cargo run -p xtask_codegen -- new-crate --name={{snakecase(name)}} |
| 144 | + |
| 145 | +# Creates a new changeset for the final changelog |
| 146 | +# new-changeset: |
| 147 | +# knope document-change |
| 148 | + |
| 149 | +# Dry-run of the release |
| 150 | +# dry-run-release *args='': |
| 151 | +# knope release --dry-run {{args}} |
| 152 | + |
0 commit comments