A wasm 🕸 template for Rust 🦀 to publish to gh-pages without npm-deploy
It automatically hosts you wasm projects on gh-pages using a travis script on the latest commit.
Cargo.toml
to suit yourselfwww/package.json
to suit yourself, also remember to change "dependencies": {
"wasm-template-rust": "file:../pkg"
},
Into :
"dependencies": {
"YOUR-PROJECT-NAME-SAME-AS-IN-CARGO.toml": "file:../pkg"
},
wasm-pack build
inside your project dictionarynpm install
inside www
folderwww/index.js
to import your PROJECT
instead of the wasm-template-rust
packagenpm install
inside www
folder (just to be sure)npm run start
inside www
and visit http://localhost:8080 to see the resultsThe template comes with a preconfigured .travis.yml
but you will still need to :
gh-pages
Settings -> GitHub Pages
and enable it on your gh-pages
branch. You will also find the link to your to-be hosted page theremore options -> settings -> Environment Variables
and enter the token value
(the generated token code) and name
as GITHUB_TOKEN
, it should look like :
Licensed under either of these: