Skip to content

Commit 36878b6

Browse files
committed
chore: move rstack into packages workspace
1 parent 74939da commit 36878b6

17 files changed

Lines changed: 159 additions & 46 deletions

oxfmt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { defineConfig } from 'oxfmt';
22

33
export default defineConfig({
44
singleQuote: true,
5-
ignorePatterns: ['dist/**', 'pnpm-lock.yaml'],
5+
ignorePatterns: ['**/dist/**', 'pnpm-lock.yaml'],
66
});

package.json

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,21 @@
11
{
2-
"name": "rstack",
3-
"version": "0.0.0",
2+
"name": "rstack-monorepo",
3+
"private": true,
44
"license": "MIT",
55
"repository": "https://github.com/rstackjs/rstack",
6-
"bin": {
7-
"rs": "./bin/rs.js",
8-
"rstack": "./bin/rs.js"
9-
},
10-
"files": [
11-
"dist"
12-
],
136
"type": "module",
14-
"types": "./dist/index.d.ts",
15-
"exports": {
16-
".": {
17-
"types": "./dist/index.d.ts",
18-
"default": "./dist/index.js"
19-
}
20-
},
21-
"publishConfig": {
22-
"access": "public",
23-
"registry": "https://registry.npmjs.org/"
24-
},
257
"scripts": {
26-
"build": "rslib",
8+
"build": "pnpm --filter './packages/**' build",
279
"check-spell": "pnpm dlx cspell",
28-
"dev": "rslib -w",
10+
"dev": "pnpm --filter './packages/**' dev",
2911
"format": "oxfmt .",
3012
"format:check": "oxfmt . --check",
3113
"lint": "rslint && node --run format:check",
3214
"lint:write": "rslint --fix && node --run format",
33-
"test": "echo 'pass'",
34-
"bump": "pnpx bumpp"
35-
},
36-
"dependencies": {
37-
"@rsbuild/core": "catalog:",
38-
"@rstest/adapter-rsbuild": "catalog:",
39-
"@rstest/core": "catalog:"
15+
"test": "pnpm --filter './packages/**' test"
4016
},
4117
"devDependencies": {
4218
"@playwright/test": "catalog:",
43-
"@rslib/core": "catalog:",
4419
"@rslint/core": "catalog:",
4520
"@types/node": "catalog:",
4621
"cspell-ban-words": "catalog:",

packages/rstack/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Rstack contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/rstack/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Rstack CLI
2+
3+
<p>
4+
<a href="https://discord.gg/XsaKEEk4mW"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat-square&logo=discord&colorA=564341&colorB=EDED91" alt="discord channel" /></a>
5+
<a href="https://npmjs.com/package/rstack?activeTab=readme"><img src="https://img.shields.io/npm/v/rstack?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a>
6+
<a href="https://npmcharts.com/compare/rstack"><img src="https://img.shields.io/npm/dm/rstack.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
7+
<a href="https://nodejs.org/en/about/previous-releases"><img src="https://img.shields.io/node/v/rstack.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="node version"></a>
8+
<a href="https://github.com/rstackjs/rstack/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" /></a>
9+
</p>
10+
11+
Rstack CLI is a unified local CLI for web development.
12+
13+
It provides one entry point for [Rsbuild](https://github.com/web-infra-dev/rsbuild), [Rslib](https://github.com/web-infra-dev/rslib), [Rstest](https://github.com/web-infra-dev/rstest), [Rslint](https://github.com/web-infra-dev/rslint), and [Rspress](https://github.com/web-infra-dev/rspress), with built-in formatting support via [Oxfmt](https://github.com/oxc-project/oxc).
14+
15+
It fits into your existing workflow instead of taking it over. Use it alongside [pnpm](https://github.com/pnpm/pnpm), [Turborepo](https://github.com/vercel/turborepo), [Nx](https://github.com/nrwl/nx), [Bun](https://github.com/oven-sh/bun), or whatever already works for your project.
16+
17+
## Features
18+
19+
- **Unified local CLI**: run Rstack tools through a single `rs` command
20+
- **Single configuration**: configure all tools from one configuration file
21+
22+
## Usage
23+
24+
Install `rstack` in your project and call it from package scripts:
25+
26+
```bash
27+
# npm
28+
npm add -D rstack
29+
# pnpm
30+
pnpm add -D rstack
31+
# yarn
32+
yarn add -D rstack
33+
# bun
34+
bun add -d rstack
35+
```
36+
37+
```json
38+
{
39+
"scripts": {
40+
"dev": "rs dev",
41+
"build": "rs build",
42+
"preview": "rs preview"
43+
}
44+
}
45+
```
46+
47+
Then run the scripts with your preferred package manager:
48+
49+
```bash
50+
pnpm dev
51+
pnpm build
52+
pnpm preview
53+
```
54+
55+
## Credits
56+
57+
Rstack CLI is inspired by:
58+
59+
- [Cargo](https://github.com/rust-lang/cargo)
60+
- [Deno](https://github.com/denoland/deno)
61+
- [Bun](https://github.com/oven-sh/bun)
62+
- [Vite Plus](https://github.com/voidzero-dev/vite-plus)
63+
64+
## License
65+
66+
[MIT](./LICENSE).
File renamed without changes.

packages/rstack/package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "rstack",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"repository": "https://github.com/rstackjs/rstack",
6+
"bin": {
7+
"rs": "./bin/rs.js",
8+
"rstack": "./bin/rs.js"
9+
},
10+
"files": [
11+
"bin",
12+
"dist"
13+
],
14+
"type": "module",
15+
"types": "./dist/index.d.ts",
16+
"exports": {
17+
".": {
18+
"types": "./dist/index.d.ts",
19+
"default": "./dist/index.js"
20+
}
21+
},
22+
"publishConfig": {
23+
"access": "public",
24+
"registry": "https://registry.npmjs.org/"
25+
},
26+
"scripts": {
27+
"build": "rslib",
28+
"dev": "rslib -w",
29+
"test": "echo 'pass'"
30+
},
31+
"dependencies": {
32+
"@rsbuild/core": "catalog:",
33+
"@rstest/adapter-rsbuild": "catalog:",
34+
"@rstest/core": "catalog:"
35+
},
36+
"devDependencies": {
37+
"@rslib/core": "catalog:",
38+
"@types/node": "catalog:",
39+
"typescript": "catalog:"
40+
}
41+
}

0 commit comments

Comments
 (0)