mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:10:09 +00:00
Actually fix wasm-pack build command (#1862)
I initially attempted to run `wasm-pack build -p ruff` which gave the error message: Error: crate directory is missing a `Cargo.toml` file; is `-p` the wrong directory? I interpreted that as wasm-pack looking for the "ruff" directory because I specified -p ruff, however actually the wasm-pack build usage is: wasm-pack build [FLAGS] [OPTIONS] <path> <cargo-build-options> And I was missing the `<path>` argument. So this actually wasn't at all a bug in wasm-pack but just a confusing error message. And the symlink hack I introduced in the previous commit didn't actually work ... I only accidentally omitted the `-p` when testing (which ended up as `ruff` being the <path> argument) ... CLIs are fun.
This commit is contained in:
parent
156e09536e
commit
7b1ce72f86
1 changed files with 1 additions and 2 deletions
3
.github/workflows/playground.yaml
vendored
3
.github/workflows/playground.yaml
vendored
|
@ -31,8 +31,7 @@ jobs:
|
||||||
- uses: jetli/wasm-pack-action@v0.4.0
|
- uses: jetli/wasm-pack-action@v0.4.0
|
||||||
- uses: jetli/wasm-bindgen-action@v0.2.0
|
- uses: jetli/wasm-bindgen-action@v0.2.0
|
||||||
- name: "Run wasm-pack"
|
- name: "Run wasm-pack"
|
||||||
run: ln -s . ruff # HACK because `wasm-pack build` doesn't support our crate structure (see https://github.com/rustwasm/wasm-pack/issues/1211)
|
run: wasm-pack build --target web --out-dir playground/src/pkg . -- -p ruff
|
||||||
run: wasm-pack build --target web --out-dir playground/src/pkg -p ruff
|
|
||||||
- name: "Install Node dependencies"
|
- name: "Install Node dependencies"
|
||||||
run: npm ci
|
run: npm ci
|
||||||
working-directory: playground
|
working-directory: playground
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue