Pierre-Étienne Meunier
b92a3366eb
Rustfmt
7 years ago
Pierre-Étienne Meunier
30d9e2bd07
Fixing wasm-pack on non-rustup setups
7 years ago
daubaris
75b85e58c7
addition of stamp file and additional thread for running version checks
7 years ago
Mason Stallmo
272ef97bef
Refactor: make `crate_license` a method of CrateData.
7 years ago
Mason Stallmo
1c704b7b7c
Reword WTFPL and add punctuation to license not found message.
7 years ago
Mason Stallmo
2d837f795c
Copy license file(s) to out directory
...
Check the Cagro.toml for a license and if one is found glob for LICENSE* files to copy to the out directory
7 years ago
huangjj27
2512199cb3
resolve conlicts and pass the test
7 years ago
huangjj27
6d3f1c2835
remove canonicalize and use display directly
7 years ago
huangjj27
b301015588
update: rebasing to master
...
fixes conflicts encountered when rebasing to master
fixes # 390
7 years ago
huangjj27
cf56fa10d6
bugfix(command/build): passing test case
...
this commit fixes #390 , #414 , and closes #408 for the test case
have to pass after a successful build.
7 years ago
huangjj27
6edb3732aa
update(command/build): lazily eval if canonicalizing failed
7 years ago
huangjj27
6c54d293f5
fmt(command/build.rs): format code changes
7 years ago
huangjj27
d6aea784af
Update src/command/build.rs
...
use Path::display to show out_dir
7 years ago
Junjie Huang
c98287ff16
bugfix(command/build.rs): Cancel Escape
...
fix #390
7 years ago
Jesper Håkansson
07d813f606
fix: Print the possible misspelled key so the user doesnt have to guess
7 years ago
Jesper Håkansson
c39410c81e
feat: Use levenshtein function to warn about wasm-pack typos
7 years ago
Jesper Håkansson
6894e63110
chore: Fix typo
7 years ago
Jesper Håkansson
2ed3d01541
refactor: Move parsing and warning code into two new functions
7 years ago
daubaris
f7c534ffe5
updated from upstream
7 years ago
Jesper Håkansson
59039e4118
feat: Catch types in Cargo.toml and warn about them
7 years ago
Nick Fitzgerald
64d52d8735
Add three build profiles and infrastructure for their toml configuration
...
Fixes #153
Fixes #160
7 years ago
Mackenzie Clark
b3d62e1649
do not canonicalize the crate path
7 years ago
Jesper Håkansson
99b9602d31
chore: Run latest rustfmt
7 years ago
Alex Crichton
fe48dbd15a
Don't require cdylib crate-type for testing
...
The `cdylib` crate type output isn't actually necessary for the
`wasm-pack test` stage because `wasm-bindgen` isn't run over a wasm
file. This commit removes the checks during `wasm-pack test` that the
`cdylib` crate type is configured.
7 years ago
Jesper Håkansson
489d3e84c2
refactor: Rename binary-install to wasm-pack-binary-install
7 years ago
Jesper Håkansson
50e472de05
chore: Remove unused crates and error variants
7 years ago
Alex Crichton
11beac3736
Replace internal `Error` with `failure::Error`
...
This commit removes the internal `Error` type in favor of exclusively
using the `failure::Error` type, simplifying error construction in a
number of locations and reducing the number of error types in play.
7 years ago
Nick Fitzgerald
3575a0a5fc
Rename `--debug` to `--dev` to match `cargo`
...
See #437
7 years ago
Alex Crichton
35fe250d09
Fix wasm-bindgen if lib is renamed via `lib.name`
...
This commit fixes an issue where if a library is renamed via the `name`
key in the `[lib]` section of the manifest then `wasm-pack` would try to
generate bindings for an noexistent wasm-file, generating an error.
The fix was to internally use `cargo_metadata` more aggressively and
move around where this data is generated. This ended up refactoring a
few locations, but this should also bring improved error messages for
`cargo metadata` as well as caching the resulting data more aggressively
to avoid recalculating it too much.
Closes #339
7 years ago
Nick Fitzgerald
6d3e9dfebb
Refactor: make `check_crate_config` a method of `CargoManifest`
7 years ago
Nick Fitzgerald
25490301e0
Refactor: make `get_crate_name` a method of `CargoManifest`
7 years ago
Nick Fitzgerald
0e09b3fd3c
Refactor: make `write_package_json` a method on `CargoManifest`
7 years ago
Nick Fitzgerald
511e6c29a0
Refactor: replace `manifest::read_cargo_toml` with a constructor
7 years ago
Nick Fitzgerald
4e6abcfd1d
Only read the `Cargo.toml` manifest once
...
And then keep reusing what we read, instead of re-reading it again.
Fixes #25
7 years ago
Alex Crichton
f986edf4c7
Move test synchronization to tests, not in `wasm-pack`
...
In `wasm-pack` it can't do cross-process synchronization, and in tests
there's now multiple processes which need to be synchronized.
7 years ago
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
1bbc966240
Don't print stdout/stderr in error messages because we already pipe that to console when running the child process
...
Fixes #422
7 years ago
Nick Fitzgerald
b16660375e
Add "Error:" prefix to error messages
7 years ago
Nick Fitzgerald
352b47d732
Provide better error context for `cargo build`
7 years ago
Jesper Håkansson
65d060cfc4
chore: Run latest rustfmt
7 years ago
Nick Fitzgerald
182c3931c3
Run cargo fmt
7 years ago
Nick Fitzgerald
965ae35933
Add no-modules to --target flag's help text
...
Fixes #416
7 years ago
huangjj27
c713477ac8
change for cargo_metadata
7 years ago
huangjj27
ee9116d2e0
bugfix(bindgen-target-dir): use PathBuf to join
...
the old code are hard coded path with "/", which may cause error
on windows, thus changing to use PathBuf.join.
fixing #414
7 years ago
Jesper Håkansson
a4b29a9293
refactor: Move binary installation to it's own crate
7 years ago
daubaris
7c3f497e3c
added wasm-pack feature checking wasm-pack version
7 years ago
Jesper Håkansson
9404c1496d
chore: Run rustfmt
7 years ago
Jesper Håkansson
b7a84200a6
chore: Run rustfmt
7 years ago
Jesper Håkansson
0be4905e31
refactor: Return failure::Error instead of wasm_pack::error::Error
7 years ago
Jesper Håkansson
899f5e0ffc
refactor: Import self and use full module path for failure
...
Use full module path for failure to be consistent since
it's used like that in other modules.
7 years ago