rsw-node
v1.0.2
Published
[![npm](https://img.shields.io/npm/v/rsw-node.svg)](https://www.npmjs.com/package/rsw-node) [![npm downloads](https://img.shields.io/npm/dm/rsw-node.svg)](https://npmjs.org/package/rsw-node) [![chat](https://img.shields.io/badge/chat-discord-blue?style=fl
Downloads
113
Maintainers
Readme
rsw-node
wasm-pack build
executed in remote deployment, use with vite-plugin-rsw.
Pre-installed
- rust
- nodejs
- wasm-pack:
npm install -g wasm-pack
- vite-plugin-rsw:
npm install -D vite-plugin-rsw
Get Started
# rsw -h: command help
# You can use the `rsw` command alone
npm install -g rsw-node
Usage
# install rsw
npm i -D rsw-node
# or
yarn add -D rsw-node
Usage:
step1: create .rsw.json in the project root path.
step2: edit .rsw.json
crates - package name, support npm organization
{
"crates": []
}
step3: edit package.json
{
"scripts": {
"rsw:build": "rsw && npm run build"
}
}
For example:
// .rsw.json
{
"crates": [
"@rsw/chasm", // npm org
"game-of-life", // npm package
]
}
// package.json
{
// ...
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
+ "rsw:build": "rsw && npm run build"
}
}
Use DEBUG=rsw:cmd
to enable debug mode
License
MIT License © 2021 lencx