create-rsbuild 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,6 +6,16 @@
6
6
 
7
7
  Create a new Rsbuild project.
8
8
 
9
+ <p>
10
+ <a href="https://npmjs.com/package/create-rsbuild">
11
+ <img src="https://img.shields.io/npm/v/create-rsbuild?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
12
+ </a>
13
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
14
+ <a href="https://npmcharts.com/compare/create-rsbuild?minimal=true"><img src="https://img.shields.io/npm/dm/create-rsbuild.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
15
+ </p>
16
+
17
+ ## Usage
18
+
9
19
  Using `npm create`:
10
20
 
11
21
  ```bash
@@ -23,12 +33,8 @@ npx create-rsbuild -d my-project -t react
23
33
 
24
34
  ## Documentation
25
35
 
26
- https://rsbuild.dev/
27
-
28
- ## Contributing
29
-
30
- Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).
36
+ See [Documentation](https://rsbuild.dev/guide/start/quick-start).
31
37
 
32
38
  ## License
33
39
 
34
- Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
40
+ [MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
package/dist/index.js CHANGED
@@ -22,7 +22,11 @@ async function getTemplateName({ template }) {
22
22
  },
23
23
  {
24
24
  value: 'react',
25
- label: 'React'
25
+ label: 'React 19'
26
+ },
27
+ {
28
+ value: 'react18',
29
+ label: 'React 18'
26
30
  },
27
31
  {
28
32
  value: 'vue3',
@@ -74,6 +78,10 @@ function mapESLintTemplate(templateName) {
74
78
  case 'svelte-js':
75
79
  case 'svelte-ts':
76
80
  return templateName;
81
+ case 'react18-js':
82
+ return 'react-js';
83
+ case 'react18-ts':
84
+ return 'react-js';
77
85
  }
78
86
  const language = templateName.split('-')[1];
79
87
  return `vanilla-${language}`;
@@ -82,8 +90,12 @@ function mapESLintTemplate(templateName) {
82
90
  root: __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(src_dirname, '..'),
83
91
  name: 'rsbuild',
84
92
  templates: [
93
+ 'vanilla-js',
94
+ 'vanilla-ts',
85
95
  'react-js',
86
96
  'react-ts',
97
+ 'react18-js',
98
+ 'react18-ts',
87
99
  'vue3-js',
88
100
  'vue3-ts',
89
101
  'vue2-js',
@@ -91,9 +103,7 @@ function mapESLintTemplate(templateName) {
91
103
  'svelte-js',
92
104
  'svelte-ts',
93
105
  'solid-js',
94
- 'solid-ts',
95
- 'vanilla-js',
96
- 'vanilla-ts'
106
+ 'solid-ts'
97
107
  ],
98
108
  getTemplateName,
99
109
  mapESLintTemplate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Create a new Rsbuild project",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -23,11 +23,11 @@
23
23
  "bin.js"
24
24
  ],
25
25
  "dependencies": {
26
- "create-rstack": "1.2.0"
26
+ "create-rstack": "1.3.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@rslib/core": "0.4.1",
30
- "@types/node": "^22.13.1",
29
+ "@rslib/core": "0.5.0",
30
+ "@types/node": "^22.13.4",
31
31
  "typescript": "^5.7.3"
32
32
  },
33
33
  "engines": {
@@ -12,6 +12,6 @@
12
12
  "lit": "^3.2.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4"
15
+ "@rsbuild/core": "^1.2.8"
16
16
  }
17
17
  }
@@ -12,7 +12,7 @@
12
12
  "lit": "^3.2.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "typescript": "^5.7.3"
17
17
  }
18
18
  }
@@ -9,10 +9,10 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "preact": "^10.25.4"
12
+ "preact": "^10.26.0"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-preact": "^1.3.0"
17
17
  }
18
18
  }
@@ -9,10 +9,10 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "preact": "^10.25.4"
12
+ "preact": "^10.26.0"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-preact": "^1.3.0",
17
17
  "typescript": "^5.7.3"
18
18
  }
@@ -13,7 +13,7 @@
13
13
  "react-dom": "^19.0.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^1.2.4",
16
+ "@rsbuild/core": "^1.2.8",
17
17
  "@rsbuild/plugin-react": "^1.1.0"
18
18
  }
19
19
  }
@@ -13,9 +13,9 @@
13
13
  "react-dom": "^19.0.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^1.2.4",
16
+ "@rsbuild/core": "^1.2.8",
17
17
  "@rsbuild/plugin-react": "^1.1.0",
18
- "@types/react": "^19.0.8",
18
+ "@types/react": "^19.0.9",
19
19
  "@types/react-dom": "^19.0.3",
20
20
  "typescript": "^5.7.3"
21
21
  }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "rsbuild-react18-js",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "rsbuild build",
8
+ "dev": "rsbuild dev --open",
9
+ "preview": "rsbuild preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1"
14
+ },
15
+ "devDependencies": {
16
+ "@rsbuild/core": "^1.2.8",
17
+ "@rsbuild/plugin-react": "^1.1.0"
18
+ }
19
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginReact } from '@rsbuild/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [pluginReact()],
6
+ });
@@ -0,0 +1,26 @@
1
+ body {
2
+ margin: 0;
3
+ color: #fff;
4
+ font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
5
+ background-image: linear-gradient(to bottom, #020917, #101725);
6
+ }
7
+
8
+ .content {
9
+ display: flex;
10
+ min-height: 100vh;
11
+ line-height: 1.1;
12
+ text-align: center;
13
+ flex-direction: column;
14
+ justify-content: center;
15
+ }
16
+
17
+ .content h1 {
18
+ font-size: 3.6rem;
19
+ font-weight: 700;
20
+ }
21
+
22
+ .content p {
23
+ font-size: 1.2rem;
24
+ font-weight: 400;
25
+ opacity: 0.5;
26
+ }
@@ -0,0 +1,12 @@
1
+ import './App.css';
2
+
3
+ const App = () => {
4
+ return (
5
+ <div className="content">
6
+ <h1>Rsbuild with React</h1>
7
+ <p>Start building amazing things with Rsbuild.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+
5
+ const root = ReactDOM.createRoot(document.getElementById('root'));
6
+ root.render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>,
10
+ );
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "rsbuild-react18-ts",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "rsbuild build",
8
+ "dev": "rsbuild dev --open",
9
+ "preview": "rsbuild preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1"
14
+ },
15
+ "devDependencies": {
16
+ "@rsbuild/core": "^1.2.8",
17
+ "@rsbuild/plugin-react": "^1.1.0",
18
+ "@types/react": "^18.3.18",
19
+ "@types/react-dom": "^18.3.5",
20
+ "typescript": "^5.7.3"
21
+ }
22
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginReact } from '@rsbuild/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [pluginReact()],
6
+ });
@@ -0,0 +1,26 @@
1
+ body {
2
+ margin: 0;
3
+ color: #fff;
4
+ font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
5
+ background-image: linear-gradient(to bottom, #020917, #101725);
6
+ }
7
+
8
+ .content {
9
+ display: flex;
10
+ min-height: 100vh;
11
+ line-height: 1.1;
12
+ text-align: center;
13
+ flex-direction: column;
14
+ justify-content: center;
15
+ }
16
+
17
+ .content h1 {
18
+ font-size: 3.6rem;
19
+ font-weight: 700;
20
+ }
21
+
22
+ .content p {
23
+ font-size: 1.2rem;
24
+ font-weight: 400;
25
+ opacity: 0.5;
26
+ }
@@ -0,0 +1,12 @@
1
+ import './App.css';
2
+
3
+ const App = () => {
4
+ return (
5
+ <div className="content">
6
+ <h1>Rsbuild with React</h1>
7
+ <p>Start building amazing things with Rsbuild.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1 @@
1
+ /// <reference types="@rsbuild/core/types" />
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from './App';
4
+
5
+ const rootEl = document.getElementById('root');
6
+ if (rootEl) {
7
+ const root = ReactDOM.createRoot(rootEl);
8
+ root.render(
9
+ <React.StrictMode>
10
+ <App />
11
+ </React.StrictMode>,
12
+ );
13
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["DOM", "ES2020"],
4
+ "jsx": "react-jsx",
5
+ "target": "ES2020",
6
+ "noEmit": true,
7
+ "skipLibCheck": true,
8
+ "useDefineForClassFields": true,
9
+
10
+ /* modules */
11
+ "module": "ESNext",
12
+ "isolatedModules": true,
13
+ "resolveJsonModule": true,
14
+ "moduleResolution": "Bundler",
15
+ "allowImportingTsExtensions": true,
16
+
17
+ /* type checking */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true
21
+ },
22
+ "include": ["src"]
23
+ }
@@ -12,7 +12,7 @@
12
12
  "solid-js": "^1.9.4"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-babel": "^1.0.3",
17
17
  "@rsbuild/plugin-solid": "^1.0.4"
18
18
  }
@@ -12,7 +12,7 @@
12
12
  "solid-js": "^1.9.4"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-babel": "^1.0.3",
17
17
  "@rsbuild/plugin-solid": "^1.0.4",
18
18
  "typescript": "^5.7.3"
@@ -9,10 +9,10 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "svelte": "^5.19.9"
12
+ "svelte": "^5.20.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-svelte": "^1.0.7"
17
17
  }
18
18
  }
@@ -10,10 +10,10 @@
10
10
  "svelte-check": "svelte-check --tsconfig ./tsconfig.json"
11
11
  },
12
12
  "dependencies": {
13
- "svelte": "^5.19.9"
13
+ "svelte": "^5.20.1"
14
14
  },
15
15
  "devDependencies": {
16
- "@rsbuild/core": "^1.2.4",
16
+ "@rsbuild/core": "^1.2.8",
17
17
  "@rsbuild/plugin-svelte": "^1.0.7",
18
18
  "svelte-check": "^4.1.4",
19
19
  "typescript": "^5.7.3"
@@ -9,6 +9,6 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "devDependencies": {
12
- "@rsbuild/core": "^1.2.4"
12
+ "@rsbuild/core": "^1.2.8"
13
13
  }
14
14
  }
@@ -9,7 +9,7 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "devDependencies": {
12
- "@rsbuild/core": "^1.2.4",
12
+ "@rsbuild/core": "^1.2.8",
13
13
  "typescript": "^5.7.3"
14
14
  }
15
15
  }
@@ -12,7 +12,7 @@
12
12
  "vue": "^2.7.16"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-vue2": "^1.0.2"
17
17
  }
18
18
  }
@@ -12,7 +12,7 @@
12
12
  "vue": "^2.7.16"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-vue2": "^1.0.2",
17
17
  "typescript": "^5.7.3"
18
18
  }
@@ -12,7 +12,7 @@
12
12
  "vue": "^3.5.13"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-vue": "^1.0.5"
17
17
  }
18
18
  }
@@ -12,7 +12,7 @@
12
12
  "vue": "^3.5.13"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "^1.2.4",
15
+ "@rsbuild/core": "^1.2.8",
16
16
  "@rsbuild/plugin-vue": "^1.0.5",
17
17
  "typescript": "^5.7.3"
18
18
  }