Skip to content

Commit b4ea443

Browse files
authored
chore: migrate to Rstack CLI (#85)
1 parent d74f26d commit b4ea443

17 files changed

Lines changed: 500 additions & 356 deletions
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: rstack-cli-docs
3+
description: Consult installed, version-matched Rstack docs only for user-facing `rs` command behavior, `rstack.config.*` semantics, or public `rstack` APIs. Do not use for purely internal implementation, tests, performance, or repository maintenance.
4+
---
5+
6+
# Rstack CLI docs
7+
8+
Rstack CLI is the `rstack` package, exposed through the `rs` binaries. It provides one CLI, one
9+
config file, and a consistent workflow for the Rstack JavaScript toolchain.
10+
11+
It covers web app, library, docs, test, lint, formatting, Git hook, and staged-file workflows.
12+
13+
## Read installed docs when this skill applies
14+
15+
When this skill applies, find and read the relevant Markdown documentation shipped with the installed `rstack` package.
16+
17+
Model knowledge can be outdated; the installed documentation is the source of truth for the project's Rstack version.
18+
19+
1. Start with `node_modules/rstack/docs/llms.txt`, then read only the linked pages relevant to the task before proposing or making changes.
20+
21+
2. For exact CLI flags and behavior, also run `rs -h` or `rs <command> -h` when supported.
22+
23+
If the bundled docs are not available at that path, locate the installed `rstack` package.
24+
25+
If they are still unavailable, verify that `rstack` is installed, and use CLI help plus the online [Rstack documentation](https://rstack.rs/) as a fallback.

‎.prettierignore‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.prettierrc‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎.rstack/hooks/pre-commit‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rs staged

‎.vscode/extensions.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["rstack.rslint", "esbenp.prettier-vscode"]
2+
"recommendations": ["rstack.rstack"]
33
}

‎.vscode/settings.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"search.useIgnoreFiles": true,
3-
"editor.defaultFormatter": "esbenp.prettier-vscode"
3+
"editor.defaultFormatter": "rstack.rstack"
44
}

‎package.json‎

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,25 @@
2020
"dist"
2121
],
2222
"scripts": {
23-
"build": "rslib",
24-
"dev": "rslib -w",
25-
"lint": "rslint && prettier -c .",
26-
"lint:write": "rslint --fix && prettier -w .",
27-
"prepare": "simple-git-hooks",
28-
"test": "rstest",
29-
"bump": "pnpx bumpp"
30-
},
31-
"simple-git-hooks": {
32-
"pre-commit": "pnpm run lint:write"
23+
"build": "rs lib",
24+
"bump": "pnpx bumpp",
25+
"check": "rs check",
26+
"dev": "rs lib -w",
27+
"format": "rs fmt",
28+
"lint": "rs lint",
29+
"prepare": "rs hooks",
30+
"test": "rs test"
3331
},
3432
"dependencies": {
3533
"@swc/plugin-styled-components": "^13.0.0",
3634
"reduce-configs": "^1.1.2"
3735
},
3836
"devDependencies": {
39-
"@rsbuild/core": "^2.2.1",
40-
"@rslib/core": "^0.23.2",
41-
"@rslint/core": "^0.9.0",
42-
"@rstest/core": "^0.11.11",
37+
"@rsbuild/core": "^2.2.2",
4338
"@rstest/playwright": "^0.11.11",
4439
"@types/node": "^24.13.3",
4540
"playwright": "^1.62.1",
46-
"prettier": "^3.9.6",
47-
"simple-git-hooks": "^2.14.0",
41+
"rstack": "^0.7.2",
4842
"styled-components": "^6.5.3",
4943
"typescript": "^7.0.2"
5044
},

‎playground/package.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "playground",
3-
"private": true,
43
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
56
"scripts": {
6-
"dev": "npx rsbuild",
7-
"build": "npx rsbuild build"
7+
"build": "rs build",
8+
"dev": "rs dev"
89
}
910
}

‎playground/rsbuild.config.ts‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎playground/rstack.config.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Configuration guide: https://rstack.rs/config
2+
import { define } from 'rstack';
3+
import { pluginStyledComponents } from '../src/index.ts';
4+
5+
define.app({
6+
plugins: [pluginStyledComponents()],
7+
});

0 commit comments

Comments
 (0)