-
-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(infra): improve the configuration of
justfile
(#7526)
- Loading branch information
Showing
9 changed files
with
121 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
[package] | ||
edition = "2021" | ||
license = "MIT" | ||
name = "rspack_futures" | ||
repository = "https://github.com/web-infra-dev/rspack" | ||
version = "0.1.0" | ||
description = "rspack futures" | ||
edition = "2021" | ||
license = "MIT" | ||
name = "rspack_futures" | ||
repository = "https://github.com/web-infra-dev/rspack" | ||
version = "0.1.0" | ||
|
||
[dependencies] | ||
async-scoped = { workspace = true, features = ["use-tokio"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,82 @@ | ||
# Setup the tools needed to develop | ||
setup-tools: | ||
cargo install cargo-release insta | ||
# publish rust crates | ||
release-crates: | ||
#!/usr/bin/env -S just --justfile | ||
|
||
# Set shell configurations | ||
set windows-shell := ["powershell"] | ||
set shell := ["bash", "-cu"] | ||
|
||
# Default target: List all tasks with updated information | ||
_default: | ||
just --list -u | ||
|
||
# Setup environment for Rust and Node.js | ||
setup: | ||
# Install Rust-related tools | ||
cargo install cargo-binstall | ||
cargo binstall taplo-cli cargo-release cargo-insta cargo-deny -y | ||
|
||
# Setup Node.js environment | ||
corepack enable | ||
pnpm install | ||
|
||
@echo '✅ Setup complete!' | ||
|
||
# Check readiness of the project | ||
ready: | ||
just fmt | ||
just check | ||
just lint | ||
just test | ||
@echo '✅ All passed!' | ||
|
||
# Publish Rust crates to crates.io | ||
release-rust: | ||
cargo release publish --no-verify --execute --no-confirm | ||
|
||
# Format Rust, TOML files, and JavaScript code | ||
fmt: | ||
cargo fmt --all -- --emit=files | ||
taplo fmt | ||
pnpm format:js | ||
|
||
# Lint Rust and JavaScript code | ||
lint: | ||
cargo clippy --workspace --all-targets -- --deny warnings | ||
pnpm lint:js | ||
|
||
# Check Rust code for compilation errors | ||
check: | ||
cargo check --workspace | ||
|
||
# Run tests for both Rust and Node.js | ||
test: | ||
just test-rust | ||
just test-node | ||
|
||
# Run Rust tests | ||
test-rust: | ||
cargo test --no-fail-fast | ||
|
||
# Supported mode: unit, ci, webpack, plugin | ||
test-node mode="unit": | ||
pnpm install | ||
pnpm build:cli:debug | ||
pnpm test:{{mode}} | ||
|
||
# Support `just build [debug|release] (--force)` | ||
build mode="debug" *args="": | ||
pnpm --filter @rspack/binding build:{{mode}} | ||
pnpm --filter "@rspack/*" build {{args}} | ||
|
||
# Support `just watch [all|rust|node] [debug|release]` | ||
watch target="all" mode="debug": | ||
just _watch-{{target}} {{mode}} | ||
|
||
_watch-all mode: | ||
pnpm --filter @rspack/binding watch:{{mode}} | ||
pnpm --filter "@rspack/*" watch | ||
|
||
_watch-rust mode: | ||
pnpm --filter @rspack/binding watch:{{mode}} | ||
|
||
_watch-node: | ||
pnpm --filter "@rspack/*" watch |
e311871
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Ran ecosystem CI: Open
e311871
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Benchmark detail: Open