diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..20a98d1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: rust +sudo: false +cache: + cargo +rust: + - stable + - beta + - nightly + +script: + - cargo test + - rustup component add rustfmt-preview + - cargo fmt -- --write-mode diff +matrix: + allow_failures: + - rust: nightly diff --git a/README.md b/README.md index eba8f80..9d1d475 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # 📦✨ wasm-pack > pack up the wasm and publish it to npm! +[![Build Status](https://travis-ci.org/ashleygwilliams/wasm-pack.svg?branch=master)](https://travis-ci.org/ashleygwilliams/wasm-pack) + the goal of this project is to create a portable command line tool for publishing compiled wasm projects to the npm registry for the consumption of js devs using the npm CLI, yarn, or any other CLI tool that interfaces @@ -23,14 +25,25 @@ this project is written in rust. [get rust] to work on this project. 2. `cd wasm-pack` 3. `cargo run` +## 💃 commands + +- `help`: display available commands +- 🐣 `init`: + - generate a `package.json` + - run [wasm-bindgen] [NOT 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] + ## ⚙️ what's it do? right now? not much. here's the plan: - [x] read data from `Cargo.toml` +- [ ] run [wasm-bindgen] - [ ] read JS dependency data from your compiled wasm (see [rust-wasm/36]) - [x] write data to `package.json` - [ ] log you in to npm - [ ] publish package to npm registry [rust-wasm/36]: https://github.com/rust-lang-nursery/rust-wasm/issues/36 +[wasm-bindgen]: https://github.com/alexcrichton/wasm-bindgen diff --git a/src/lib.rs b/src/lib.rs index 3696813..9e5aa7b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,8 @@ +extern crate failure; #[macro_use] extern crate serde_derive; extern crate serde_json; extern crate toml; -extern crate failure; use std::fs::File; use std::io::prelude::*;