From 71c2edc03fe5be45a18c9572775186349036f916 Mon Sep 17 00:00:00 2001 From: Ashley Williams Date: Thu, 15 Mar 2018 11:59:19 +0100 Subject: [PATCH] feat(doc): scope flag --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 612a98d..2780d29 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,16 @@ this project is written in rust. [get rust] to work on this project. - `help`: display available commands - 🐣 `init`: create necessary files for js interop and npm publishing - optionally pass a path to a dir that contains a `Cargo.toml`, e.g.: - `wasm-pack init examples/js-hello-world` + ``` + wasm-pack init examples/js-hello-world + ``` + - optionally pass a scope name to generate a `package.json` for a scoped pkg, e.g.: + ``` + wasm-pack init examples/scopes-hello-world --scope test + ``` + generates a `package.json` for an npm package called `@test/scopes-hello-world` + +#### to be implemented - 🍱 `pack`: create a tarball but don't push to the npm registry [NOT IMPLEMENTED] - 🎆 `publish`: create a tarball and publish to the npm registry [NOT IMPLEMENTED] @@ -72,7 +81,7 @@ this project is written in rust. [get rust] to work on this project. ``` 5. install this tool: `cargo install wasm-pack` -6. run `wasm-pack init`, optionally, pass a path to a dir that contains your `Cargo.toml` +6. run `wasm-pack init`, optionally, pass a path to a dir or a scope (see above for details) 7. this tool generates files in a `pkg` dir. to publish to npm, `cd pkg` and then `npm publish` (in the future you'll be able to use this tool to publish)