This does a few things, remove Cargo.lock from tracking to make sure
when compiled the newest version is used in a fresh repo. Testing on
one's own will require running an 'rm tests/fixtures/*/Cargo.lock' if
wanting to bump to the newest version of wasm-bindgen. This also sets
all tests to use the latest version of wasm-bindgen in 0.2. This shows
that we support that version (0.2.x) but bumping it to 0.3 means we've
opted for that kind of change, but for now it's not been bumped to that.
This commit does quite a few things in order to get this to work:
1. We move all of the code dealing with knowing which command to run
into it's own function. This wrapper command allows us to always
close out PBAR before dumping error output. This fixes a problem
where stderr and stdout were borked and not printing out error
messages correctly.
2. We then refactor the code that has a panic to return early with that
error message.
3. If the command we ran errored, we print out with PBAR that there was
an error with the program we ran (not wasm-pack itself) then dump the
stderr from the command to the actual stderr
This means we can abort early on without continuing any of the other
parts of wasm-pack and let the user know what the error was rather than
just saying "There's an error"
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"
}
```