Mackenzie Clark
40b0291715
add out dir cli parameter
7 years ago
Nick Fitzgerald
b480674df4
fix: Handle both underscores and hypthens as separators in "wasm-bindgen" dependencies
7 years ago
csmoe
15fdec2c0b
Split fixture, rename readme to file
7 years ago
csmoe
022b787a2f
cmd(init/build): deprecate init
7 years ago
Nick Fitzgerald
ccd8edbae1
tests: Copy fixtures into unique temporary directories
...
If a test is going to do a potentially destructive operation, instead of
mutating shared fixtures, it should copy the fixture to its own unique directory
and then mutate that copy (doesn't this sound like Rust's borrowing and
ownership rules?! ^.^)
7 years ago
Ashley Williams
58eaed1550
fix(depcheck): add failing test to repro bug
7 years ago
Mackiovello
1067f215be
Use PathBuf instead of String to handle paths
...
For #213
7 years ago
Ashley Williams
4d5c7b8b3a
fix(style): appease cargo fmt
7 years ago
Ashley Williams
180c2386ad
test(skip_types): check files key for pkgjsons that skip types
7 years ago
Ashley Williams
5004517bf0
fix(files): set files correctly for node and cleanup tests
7 years ago
Ian McIntyre
e4d7048c10
One more rustfmt run!
7 years ago
Ian McIntyre
8eb01dd4a3
Add additional asserts for JS main manifest files
7 years ago
Ian McIntyre
6061eb5595
Run rustfmt
7 years ago
Ian McIntyre
b04c3a8f53
Add additional asserts for package.json files
7 years ago
Ian McIntyre
e9b05b2181
Use sets to compare package.json files content
...
Order doesn't matter!
7 years ago
Ian McIntyre
bf222549af
Include the wasm-bindgen JS bridge file in files
7 years ago
ashley williams
35fc9e048b
Revert "fix(mainfest): missing _bg.js file in package.json"
7 years ago
LongYinan
729d543802
fix(mainfest): missing _bg.js file in package.json
7 years ago
Ashley Williams
ca0f469356
refactor(command): modularize command.rs
7 years ago
kohensu
09046aa40b
Add --skip-build flag for init command
...
This flag skips:
adding target
compiling to wasm
installing wasm-bindgen
running wasm-bindgen
7 years ago
Roberto Huertas
92b18f05bb
feat(wasm_bindgen): checks wasm-bindgen declaration in Cargo.toml
7 years ago
Noah Lemen
cad30f42ce
check that crate type includes cdylib
7 years ago
Dan Reeves
953cf738f0
add the typescript definition to the published files
7 years ago
OJ Kwon
e6b5ca557f
test(manifest): update test cases
7 years ago
Ashley Williams
7da29b27b4
fix(bindgen): don't rename to index
7 years ago
Ashley Williams
6a2a20dd07
feat(test): clean up tests, test new main/files
7 years ago
Ashley Williams
e374314a32
feat(manifest): add main entry
7 years ago
Andy Bell
07d9001b59
feat(refactor): Furthers previous refactor, by moving
...
Functions to new module. Tidies up reused code into
private function.
Throws warning due to line 11 in command.rs - unused import
Import is used for the StructOpt derive macro, so is needed
but still throws this warning
7 years ago
Michael Gattozzi
9ea956f216
feat(flag): add scope flag to init subcommand
...
npm allows scopes to avoid name collisions. In order to support this
optional feature a flag has been added so that the name in the generated
package.json is correct.
Example for a package named wasm-add:
```bash
wasm-pack init
```
package.json
```json
{
"name": "wasm-add"
}
```
```bash
wasm-pack init --scope mgattozzi
```
package.json
```json
{
"name": "@mgattozzi/wasm-add"
}
```
7 years ago
steveklabnik
a891bab6c7
Improve test layout
...
I suggested this layout, but since Rust 1.22, this layout now works!
7 years ago
steveklabnik
033aaaa19b
Move examples into tests/fixtures
...
These aren't examples in the sense Cargo uses them; they're test
fixtures. As such, let's put them in tests/
Fixes #56
7 years ago
Ashley Williams
de9132e9ca
feat(tests): refactor utils into manifest_utils mod
7 years ago
Ashley Williams
b9df6d60ae
feat(test): test package json values
7 years ago
Ashley Williams
a34bfa4567
fix(tests): refactor paths out to vars
7 years ago
Ashley Williams
289babc084
feat(tests): back out dir diff for now
7 years ago
Ashley Williams
edb8e1ef72
feat(lib): reorg manifest work into mod
7 years ago
Yoshua Wuyts
5f3a704b87
also test provided_path
7 years ago
Yoshua Wuyts
ebdc99b539
add dir_diff test
7 years ago
Ashley Williams
c5780a92e8
feat(pkg): create pkg dir under provided path if avail
7 years ago
Ashley Williams
e706a41632
fix(style): appease cargo fmt
7 years ago
Ashley Williams
1c097f03e0
feat(test): test the dir passing
7 years ago
Ashley Williams
a305a4fcce
feat(test): does it get the right crate name?
7 years ago
Ashley Williams
83e44c19b8
feat(args): take a path to a crate as an arg to init
7 years ago
Ashley Williams
fed9dbff6c
feat(pkg): do it in a dir
7 years ago
Ashley Williams
3c34b27d09
feat: split into lib, test
7 years ago