Skip to content

lencx/rsw-node

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

⚪️ `wasm-pack build` executed in remote deployment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published