rsw-node

1.0.2 • Public • Published

rsw-node

npm npm downloads chat

Rust WebAssembly

wasm-pack build executed in remote deployment, use with vite-plugin-rsw.

Pre-installed

Get Started

# rsw -h: command help
# You can use the `rsw` command alone
npm install -g rsw-node

rsw cmd help

rsw cmd

build

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

Package Sidebar

Install

npm i rsw-node

Weekly Downloads

20

Version

1.0.2

License

MIT

Unpacked Size

8.69 kB

Total Files

4

Last publish

Collaborators

  • l8n