Skip to content

Latest commit

 

History

History
101 lines (79 loc) · 4.28 KB

File metadata and controls

101 lines (79 loc) · 4.28 KB

Rstack CLI

discord channel npm version downloads node version license

Rstack CLI brings the Rstack toolchain together for JavaScript development, with one CLI, one configuration, and one consistent workflow.

It also covers local development needs outside Rstack's scope, with Prettier formatting and lint-staged commands.

Command Description
rs dev Run the app dev server
rs build Build the app for production
rs preview Preview the app production build
rs test Run tests
rs lint Lint code
rs fmt Format code
rs check Run static checks, including lint and format
rs lib Build library
rs doc Serve or build docs
rs setup Install Git hooks
rs staged Run tasks on staged Git files

Rstack CLI fits into your existing project workflow. It does not replace your runtime, package manager, or task runner, such as pnpm, Bun, Turborepo, Nx, and Nub.

Current status

Rstack CLI is currently experimental and mainly used for internal validation. Its APIs, configuration, and usage may change as the project evolves.

Welcome to try it out and share feedback through issues and discussions!

Usage

  1. Install rstack in your project:
# pnpm
pnpm add -D rstack
# yarn
yarn add -D rstack
# npm
npm add -D rstack
# bun
bun add -d rstack
  1. Add scripts to your package.json:
{
  "scripts": {
    "dev": "rs dev",
    "build": "rs build",
    "preview": "rs preview",
    "test": "rs test",
    "check": "rs check --type-check",
    "lint": "rs lint",
    "lib": "rs lib",
    "doc": "rs doc",
    "format": "rs fmt",
    "prepare": "rs setup"
  }
}

Run the scripts with your preferred package manager:

pnpm dev
pnpm build
pnpm preview
pnpm test
pnpm check
pnpm lint
pnpm lib
pnpm doc
pnpm format

Credits

Rstack CLI is inspired by:

Parts of the Git hook implementation are derived from Husky, and parts of the formatter runtime are derived from Prettier CLI.

See Third-Party Notices for complete attribution and license information.

License

MIT.