Alex Crichton
c664cfddd1
Use a global cache for all downloaded binaries
...
This commit switches wasm-pack to using a global cache for all download
binaries, living typically in a user's home directory. The intention
here is to aovid creating a `bin` folder in all wasm-pack projects and
additionally share downloads between projects to ensure that you're
downloading a minimal number of binaries from the network.
Along the way the downloading code was restructured to support a global
cache, but everything should largely be as it was before!
Closes #292
7 years ago
Nick Fitzgerald
965ae35933
Add no-modules to --target flag's help text
...
Fixes #416
7 years ago
daubaris
7c3f497e3c
added wasm-pack feature checking wasm-pack version
7 years ago
Jesper Håkansson
0be4905e31
refactor: Return failure::Error instead of wasm_pack::error::Error
7 years ago
Nick Fitzgerald
2fa961d97d
Use `child::run` for spawning child processes everywhere
7 years ago
Nick Fitzgerald
e1c8ca825d
cargo fmt
7 years ago
Nick Fitzgerald
15defe9038
test: fix crate dependency suggestion
...
Fixes #377
7 years ago
Ashley Williams
d3f8264ef7
feat(buildmode): allow --mode force to skip rustc check
7 years ago
Ashley Williams
b28d2850a7
feat(build): add rustc check
7 years ago
Ashley Williams
3856db20b9
fix(style): appease cargo fmt
7 years ago
Alex Crichton
9b24dcb259
Execute `cargo metadata` at most once
...
This can be somewhat expensive, so make sure we don't have to chew
through too much!
7 years ago
data-pup
dd87211323
feat(lockfiles): Use `Cargo.lock` to identify wasm-bindgen versions
...
This lets us leverage `cargo` for semver finding and then ensure that we get the
exact same version of the CLI that cargo selected. It also lets us support fuzzy
dependencies like "0.2" instead of exact dependencies like "0.2.21" again.
7 years ago
Ashley Williams
86a4284ae7
feat(publish): add --access flag to publish command
7 years ago
Nick Fitzgerald
577d1b33e6
feature(test): Add a `wasm-pack test` subcommand
...
This uses `wasm-bindgen-test` under the hood.
Fixes #248
7 years ago
Mackenzie Clark
40b0291715
add out dir cli parameter
7 years ago
Nick Fitzgerald
7ab7a3f2cb
feature: Use pre-built `wasm-bindgen` CLIs from Github releases
...
Implements downloading tarballs from `wasm-bindgen`'s GitHub releases page and
using them if the current target has pre-built binaries.
7 years ago
data-pup
8301613278
Coordinate wasm-bindgen versions.
7 years ago
Nick Fitzgerald
ed35e497c7
Propagate missing `Cargo.toml` errors instead of unwrapping them
...
This allows them to be reported to the user, rather than panic and dump a
human-error failure.
Fixes #242
7 years ago
csmoe
022b787a2f
cmd(init/build): deprecate init
7 years ago
csmoe
ddab496f51
cmd(init/build): rebase
7 years ago
csmoe
0a616624aa
cmd(init/build): cargo clippy
7 years ago
csmoe
edbd6f4118
cmd(init/build): cargo fmt
7 years ago
csmoe
7cbfc2e893
cmd(init/build): split init and build
7 years ago
Mackiovello
37fb0bc07e
Consistently use pretty-print
7 years ago
Mackiovello
017d241b86
Remove extra quotation mark
7 years ago
Mackiovello
1067f215be
Use PathBuf instead of String to handle paths
...
For #213
7 years ago
Mackiovello
88fdbc5d39
Add documentation for pack and publish
7 years ago
Nick Fitzgerald
805b796cf9
Deny missing documentation
...
And add all the missing doc comments.
7 years ago
Ashley Williams
4d5c7b8b3a
fix(style): appease cargo fmt
7 years ago
Ashley Williams
5004517bf0
fix(files): set files correctly for node and cleanup tests
7 years ago
Mackiovello
e6cd7bb355
Simplify iteration even more
7 years ago
Mackiovello
ac34e7bba1
Write as more ideomatic rust
7 years ago
Mackiovello
63c91caeae
Check child directories instead of parent directory
7 years ago
Mackiovello
a67762a9e5
Use 'find_pkg_directory' for pack
7 years ago
Mackiovello
b57d68f97a
Search for path in entered directory and the parent of entered
...
This lets us have backwards compatibility while improving the user experience.
7 years ago
Mackiovello
8efabfa3af
Make error more specific
7 years ago
Mackiovello
ec17b8aa7e
Use custom error message for publish
7 years ago
Mackiovello
035bcbe688
Simplify match expression
7 years ago
Mackiovello
840c7bd03c
Return custom error if pkg directory is not found
7 years ago
soryrawyer
072bbc67da
Remove result prefix and std import, now that quicli is no longer a dependency
7 years ago
Ashley Williams
78527b7a7e
fix(style): appease cargo fmt
7 years ago
Michael Gattozzi
f2fbe264d4
fix(no-install): cratename should not be an option
7 years ago
Michael Gerhaeuser
62423e33d4
Replace std::sync::RwLock with parking_lot
...
The standard library version of an `RwLock` may get poisoned if a thread
panics that holds a write lock. The `RwLock` from parking_lot [1] does
not get poisoned it instead released the lock on a panic. This allows us
to simplify the `ProgressOutput` API since it no longer returns any
errors. No more panics can occur on `ProgressOutput::drop()`. The
`Error` enum can thus be simplified as well because there is no need to
convert `PoisonErrors` anymore.
[1] https://github.com/Amanieu/parking_lot
7 years ago
Ashley Williams
44f26dfcb2
feat(init): no install flag
7 years ago
Ashley Williams
ca0f469356
refactor(command): modularize command.rs
7 years ago