Nick Fitzgerald
64d52d8735
Add three build profiles and infrastructure for their toml configuration
...
Fixes #153
Fixes #160
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
Jesper Håkansson
9404c1496d
chore: Run rustfmt
7 years ago
Jesper Håkansson
0be4905e31
refactor: Return failure::Error instead of wasm_pack::error::Error
7 years ago
Mason Stallmo
78117ef4a1
Fix bad formating
7 years ago
Mason Stallmo
b82fa7db65
Combine filed missing messages into one INFO line
7 years ago
Mason Stallmo
e47af81f8f
Change to INFO when alerting users about missing fields in Cargo.toml
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
Alex Crichton
3d1f528fc9
Make tests more future-proof with wasm-bindgen
...
This way when future wasm-bindgen version are published the tests will
continue working!
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
120236f1a9
fix(style): appease cargo fmt
7 years ago
Ashley Williams
d79349e1f5
feat(manifest): build no_modules npmpkg
7 years ago
Ashley Williams
1985db371f
feat(manifest:npm): add nomodules manifest struct
7 years ago
Ashley Williams
f5eaad2d77
refactor(manifest): make check optional deps a method
7 years ago
Ashley Williams
8b9ad63985
refactor(manifest:types): clean up code duplication
7 years ago
Ashley Williams
069f7ede2e
fix(manifest:esm): snakecase to remove warning, test for sideeffects field
7 years ago
Ashley Williams
354f038a1a
fix(style): remove printlns and appease cargo fmt
7 years ago
Ashley Williams
e607eda95c
refactor(manifest): move optional field warn checks to function
7 years ago
Ashley Williams
c26a834772
fix(manifest:serialize): don't include npmpkg wrapping type
7 years ago
Ashley Williams
195c4e1cd6
feat(manifest:npm:esm): add sideeffects key, set to false
7 years ago
Ashley Williams
20239ecba3
feat(manifest): whitelist js file in es6 mod packagejson
7 years ago
Ashley Williams
7f38eb9b0c
fix(manifest:npm): s/es6/esmodules
7 years ago
Ashley Williams
f06f3cca0d
refactor(manifest/npm): break into mods
7 years ago
Ashley Williams
13d77ef539
feat(manifest): seralize into diff packagejsons based on target
7 years ago
Ashley Williams
33eccd33d8
refactor(manifest): refactor npm package into own mod
7 years ago