Skip to content

Commit bb8ecd1

Browse files
authored
chore: migrate Rspress to Rstack CLI (#8167)
1 parent 3e62fc9 commit bb8ecd1

6 files changed

Lines changed: 21 additions & 20 deletions

File tree

pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
"license": "MIT",
55
"type": "module",
66
"scripts": {
7-
"build": "rspress build",
8-
"dev": "rspress dev",
9-
"preview": "rspress preview"
7+
"build": "rs doc build",
8+
"dev": "rs doc",
9+
"preview": "rs doc preview"
1010
},
1111
"devDependencies": {
12-
"@rsbuild/core": "workspace:*",
1312
"@rsbuild/plugin-sass": "workspace:*",
1413
"@rspress/core": "catalog:",
1514
"@rspress/plugin-algolia": "catalog:",
@@ -27,6 +26,7 @@
2726
"rsbuild-plugin-google-analytics": "catalog:",
2827
"rsbuild-plugin-open-graph": "catalog:",
2928
"rspress-plugin-font-open-sans": "catalog:",
29+
"rstack": "catalog:",
3030
"typescript": "catalog:"
3131
}
3232
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { pluginSass } from '@rsbuild/plugin-sass';
2-
import { defineConfig } from '@rspress/core';
32
import { pluginAlgolia } from '@rspress/plugin-algolia';
43
import { pluginClientRedirects } from '@rspress/plugin-client-redirects';
54
import { pluginRss } from '@rspress/plugin-rss';
@@ -12,12 +11,13 @@ import {
1211
import { pluginGoogleAnalytics } from 'rsbuild-plugin-google-analytics';
1312
import { pluginOpenGraph } from 'rsbuild-plugin-open-graph';
1413
import { pluginFontOpenSans } from 'rspress-plugin-font-open-sans';
15-
import { rsbuildPluginOverview } from './theme/rsbuildPluginOverview';
14+
import { define } from 'rstack';
15+
import { rsbuildPluginOverview } from './theme/rsbuildPluginOverview.ts';
1616

1717
const siteUrl = 'https://rsbuild.rs';
1818
const description = 'The Rspack-based build tool';
1919

20-
export default defineConfig({
20+
define.doc({
2121
plugins: [
2222
pluginAlgolia(),
2323
pluginSitemap({

website/theme/env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/// <reference types="@rsbuild/core/types" />
1+
/// <reference types="rstack/types" />

website/theme/rsbuildPluginOverview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'node:path';
2-
import type { RsbuildPlugin } from '@rsbuild/core';
32
import glob from 'fast-glob';
3+
import type { RsbuildPlugin } from 'rstack/app';
44
import type { Group } from './components/Overview';
55

66
const camelCase = (input: string): string => input.replace(/[-_](\w)/g, (_, c) => c.toUpperCase());

website/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"extends": "@scripts/config/tsconfig",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"jsx": "react-jsx",
5-
"outDir": "dist",
6+
"noEmit": true,
67
"paths": {
78
"@theme": ["./theme"],
89
"@components/*": ["./theme/components/*"],
@@ -14,5 +15,5 @@
1415
"mdx": {
1516
"checkMdx": true
1617
},
17-
"include": ["docs", "rspress.config.ts", "theme", "env.d.ts"]
18+
"include": ["docs", "rstack.config.ts", "theme", "env.d.ts"]
1819
}

0 commit comments

Comments
 (0)