create-rsbuild 2.0.0-beta.7 → 2.0.0-beta.9
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/dist/index.js +22 -9
- package/package.json +12 -12
- package/template-lit-js/package.json +1 -1
- package/template-lit-ts/package.json +1 -1
- package/template-preact-js/package.json +3 -3
- package/template-preact-ts/package.json +3 -3
- package/template-react-compiler/react-js/package.json +6 -0
- package/template-react-compiler/react-js/rsbuild.config.js +17 -0
- package/template-react-compiler/react-ts/package.json +6 -0
- package/template-react-compiler/react-ts/rsbuild.config.ts +16 -0
- package/template-react-js/package.json +2 -2
- package/template-react-ts/package.json +2 -2
- package/template-react18-js/package.json +2 -2
- package/template-react18-ts/package.json +2 -2
- package/template-rstest/react-js/package.json +2 -2
- package/template-rstest/react-ts/package.json +2 -2
- package/template-rstest/vanilla-js/package.json +2 -2
- package/template-rstest/vanilla-ts/package.json +2 -2
- package/template-rstest/vue-js/package.json +2 -2
- package/template-rstest/vue-ts/package.json +2 -2
- package/template-solid-js/package.json +3 -3
- package/template-solid-ts/package.json +3 -3
- package/template-svelte-js/package.json +3 -3
- package/template-svelte-ts/package.json +4 -4
- package/template-vanilla-js/package.json +1 -1
- package/template-vanilla-ts/package.json +1 -1
- package/template-vue2-js/package.json +1 -1
- package/template-vue2-ts/package.json +1 -1
- package/template-vue3-js/package.json +3 -3
- package/template-vue3-ts/package.json +3 -3
- package/template-vue3-ts/src/env.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import node_fs from "node:fs";
|
|
2
2
|
import node_path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
3
|
import { checkCancel, copyFolder, create, select as external_create_rstack_select } from "create-rstack";
|
|
5
|
-
const src_dirname = node_path.dirname(fileURLToPath(import.meta.url));
|
|
6
4
|
const frameworkAlias = {
|
|
7
5
|
vue: 'vue3',
|
|
8
6
|
'solid-js': 'solid'
|
|
@@ -87,9 +85,9 @@ function mapESLintTemplate(templateName) {
|
|
|
87
85
|
return 'react-js';
|
|
88
86
|
case 'react18-ts':
|
|
89
87
|
return 'react-ts';
|
|
88
|
+
default:
|
|
89
|
+
return `vanilla-${templateName.split('-')[1]}`;
|
|
90
90
|
}
|
|
91
|
-
const language = templateName.split('-')[1];
|
|
92
|
-
return `vanilla-${language}`;
|
|
93
91
|
}
|
|
94
92
|
function mapRstestTemplate(templateName) {
|
|
95
93
|
switch(templateName){
|
|
@@ -103,12 +101,13 @@ function mapRstestTemplate(templateName) {
|
|
|
103
101
|
return 'vue-js';
|
|
104
102
|
case 'vue3-ts':
|
|
105
103
|
return 'vue-ts';
|
|
104
|
+
default:
|
|
105
|
+
return `vanilla-${templateName.split('-')[1]}`;
|
|
106
106
|
}
|
|
107
|
-
const language = templateName.split('-')[1];
|
|
108
|
-
return `vanilla-${language}`;
|
|
109
107
|
}
|
|
108
|
+
const root = node_path.join(import.meta.dirname, '..');
|
|
110
109
|
create({
|
|
111
|
-
root:
|
|
110
|
+
root: root,
|
|
112
111
|
name: 'rsbuild',
|
|
113
112
|
templates: [
|
|
114
113
|
'vanilla-js',
|
|
@@ -135,7 +134,7 @@ create({
|
|
|
135
134
|
order: 'pre',
|
|
136
135
|
action: ({ templateName, distFolder, addAgentsMdSearchDirs })=>{
|
|
137
136
|
const rstestTemplate = mapRstestTemplate(templateName);
|
|
138
|
-
const toolFolder = node_path.join(
|
|
137
|
+
const toolFolder = node_path.join(root, 'template-rstest');
|
|
139
138
|
const subFolder = node_path.join(toolFolder, rstestTemplate);
|
|
140
139
|
copyFolder({
|
|
141
140
|
from: subFolder,
|
|
@@ -145,11 +144,25 @@ create({
|
|
|
145
144
|
addAgentsMdSearchDirs(toolFolder);
|
|
146
145
|
}
|
|
147
146
|
},
|
|
147
|
+
{
|
|
148
|
+
value: 'react-compiler',
|
|
149
|
+
label: 'React Compiler - optimization',
|
|
150
|
+
order: 'pre',
|
|
151
|
+
when: (template)=>'react-js' === template || 'react-ts' === template,
|
|
152
|
+
action: ({ templateName, distFolder })=>{
|
|
153
|
+
const toolFolder = node_path.join(root, 'template-react-compiler');
|
|
154
|
+
copyFolder({
|
|
155
|
+
from: node_path.join(toolFolder, templateName),
|
|
156
|
+
to: distFolder,
|
|
157
|
+
isMergePackageJson: true
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
},
|
|
148
161
|
{
|
|
149
162
|
value: 'tailwindcss',
|
|
150
163
|
label: 'Tailwind CSS - styling',
|
|
151
164
|
action: async ({ distFolder })=>{
|
|
152
|
-
const from = node_path.join(
|
|
165
|
+
const from = node_path.join(root, 'template-tailwindcss');
|
|
153
166
|
copyFolder({
|
|
154
167
|
from: from,
|
|
155
168
|
to: distFolder,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rsbuild",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.9",
|
|
4
4
|
"description": "Create a new Rsbuild project",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"repository": {
|
|
@@ -23,19 +23,19 @@
|
|
|
23
23
|
"bin.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"create-rstack": "1.8.
|
|
26
|
+
"create-rstack": "1.8.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@rsbuild/plugin-react": "^1.1.0",
|
|
30
|
-
"@rslib/core": "0.
|
|
31
|
-
"@types/node": "^24.
|
|
30
|
+
"@rslib/core": "0.20.0",
|
|
31
|
+
"@types/node": "^24.12.0",
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
|
-
"@rsbuild/core": "2.0.0-beta.
|
|
34
|
-
"@rsbuild/plugin-babel": "1.1.
|
|
35
|
-
"@rsbuild/plugin-preact": "1.7.
|
|
36
|
-
"@rsbuild/plugin-solid": "1.1.
|
|
37
|
-
"@rsbuild/plugin-svelte": "1.1.
|
|
38
|
-
"@rsbuild/plugin-vue": "1.2.
|
|
33
|
+
"@rsbuild/core": "2.0.0-beta.9",
|
|
34
|
+
"@rsbuild/plugin-babel": "1.1.2",
|
|
35
|
+
"@rsbuild/plugin-preact": "1.7.2",
|
|
36
|
+
"@rsbuild/plugin-solid": "1.1.1",
|
|
37
|
+
"@rsbuild/plugin-svelte": "1.1.1",
|
|
38
|
+
"@rsbuild/plugin-vue": "1.2.7"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": "^20.19.0 || >=22.12.0"
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"registry": "https://registry.npmjs.org/"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
|
-
"build": "rslib build",
|
|
49
|
-
"dev": "rslib build -w",
|
|
48
|
+
"build": "rslib build --syntax es2023",
|
|
49
|
+
"dev": "rslib build --syntax es2023 -w",
|
|
50
50
|
"start": "node ./dist/index.js",
|
|
51
51
|
"bump": "pnpx bumpp --no-tag"
|
|
52
52
|
}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"preview": "rsbuild preview"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"preact": "^10.
|
|
12
|
+
"preact": "^10.29.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
16
|
-
"@rsbuild/plugin-preact": "^1.7.
|
|
15
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
16
|
+
"@rsbuild/plugin-preact": "^1.7.2"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"preview": "rsbuild preview"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"preact": "^10.
|
|
12
|
+
"preact": "^10.29.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
16
|
-
"@rsbuild/plugin-preact": "^1.7.
|
|
15
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
16
|
+
"@rsbuild/plugin-preact": "^1.7.2",
|
|
17
17
|
"typescript": "^5.9.3"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { defineConfig } from '@rsbuild/core';
|
|
3
|
+
import { pluginBabel } from '@rsbuild/plugin-babel';
|
|
4
|
+
import { pluginReact } from '@rsbuild/plugin-react';
|
|
5
|
+
|
|
6
|
+
// Docs: https://rsbuild.rs/config/
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [
|
|
9
|
+
pluginReact(),
|
|
10
|
+
pluginBabel({
|
|
11
|
+
include: /\.(?:jsx|tsx)$/,
|
|
12
|
+
babelLoaderOptions(opts) {
|
|
13
|
+
opts.plugins?.unshift('babel-plugin-react-compiler');
|
|
14
|
+
},
|
|
15
|
+
}),
|
|
16
|
+
],
|
|
17
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from '@rsbuild/core';
|
|
2
|
+
import { pluginBabel } from '@rsbuild/plugin-babel';
|
|
3
|
+
import { pluginReact } from '@rsbuild/plugin-react';
|
|
4
|
+
|
|
5
|
+
// Docs: https://rsbuild.rs/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [
|
|
8
|
+
pluginReact(),
|
|
9
|
+
pluginBabel({
|
|
10
|
+
include: /\.(?:jsx|tsx)$/,
|
|
11
|
+
babelLoaderOptions(opts) {
|
|
12
|
+
opts.plugins?.unshift('babel-plugin-react-compiler');
|
|
13
|
+
},
|
|
14
|
+
}),
|
|
15
|
+
],
|
|
16
|
+
});
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"react-dom": "^19.2.4"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
17
|
-
"@rsbuild/plugin-react": "^1.4.
|
|
16
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
17
|
+
"@rsbuild/plugin-react": "^1.4.6",
|
|
18
18
|
"@types/react": "^19.2.14",
|
|
19
19
|
"@types/react-dom": "^19.2.3",
|
|
20
20
|
"typescript": "^5.9.3"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"react-dom": "^18.3.1"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
17
|
-
"@rsbuild/plugin-react": "^1.4.
|
|
16
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
17
|
+
"@rsbuild/plugin-react": "^1.4.6",
|
|
18
18
|
"@types/react": "^18.3.18",
|
|
19
19
|
"@types/react-dom": "^18.3.5",
|
|
20
20
|
"typescript": "^5.9.3"
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"@testing-library/dom": "^10.4.1",
|
|
8
8
|
"@testing-library/jest-dom": "^6.9.1",
|
|
9
9
|
"@testing-library/react": "^16.3.2",
|
|
10
|
-
"@rstest/core": "^0.9.
|
|
10
|
+
"@rstest/core": "^0.9.2",
|
|
11
11
|
"@rstest/adapter-rsbuild": "^0.2.2",
|
|
12
|
-
"happy-dom": "^20.8.
|
|
12
|
+
"happy-dom": "^20.8.4"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"@testing-library/dom": "^10.4.1",
|
|
8
8
|
"@testing-library/jest-dom": "^6.9.1",
|
|
9
9
|
"@testing-library/react": "^16.3.2",
|
|
10
|
-
"@rstest/core": "^0.9.
|
|
10
|
+
"@rstest/core": "^0.9.2",
|
|
11
11
|
"@rstest/adapter-rsbuild": "^0.2.2",
|
|
12
|
-
"happy-dom": "^20.8.
|
|
12
|
+
"happy-dom": "^20.8.4"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"@testing-library/dom": "^10.4.1",
|
|
8
8
|
"@testing-library/jest-dom": "^6.9.1",
|
|
9
9
|
"@testing-library/vue": "^8.1.0",
|
|
10
|
-
"@rstest/core": "^0.9.
|
|
10
|
+
"@rstest/core": "^0.9.2",
|
|
11
11
|
"@rstest/adapter-rsbuild": "^0.2.2",
|
|
12
|
-
"happy-dom": "^20.8.
|
|
12
|
+
"happy-dom": "^20.8.4"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"@testing-library/dom": "^10.4.1",
|
|
8
8
|
"@testing-library/jest-dom": "^6.9.1",
|
|
9
9
|
"@testing-library/vue": "^8.1.0",
|
|
10
|
-
"@rstest/core": "^0.9.
|
|
10
|
+
"@rstest/core": "^0.9.2",
|
|
11
11
|
"@rstest/adapter-rsbuild": "^0.2.2",
|
|
12
|
-
"happy-dom": "^20.8.
|
|
12
|
+
"happy-dom": "^20.8.4"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"solid-js": "^1.9.11"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
16
|
-
"@rsbuild/plugin-babel": "^1.1.
|
|
17
|
-
"@rsbuild/plugin-solid": "^1.1.
|
|
15
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
16
|
+
"@rsbuild/plugin-babel": "^1.1.2",
|
|
17
|
+
"@rsbuild/plugin-solid": "^1.1.1"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"solid-js": "^1.9.11"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
16
|
-
"@rsbuild/plugin-babel": "^1.1.
|
|
17
|
-
"@rsbuild/plugin-solid": "^1.1.
|
|
15
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
16
|
+
"@rsbuild/plugin-babel": "^1.1.2",
|
|
17
|
+
"@rsbuild/plugin-solid": "^1.1.1",
|
|
18
18
|
"typescript": "^5.9.3"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"preview": "rsbuild preview"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"svelte": "^5.53.
|
|
12
|
+
"svelte": "^5.53.12"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
16
|
-
"@rsbuild/plugin-svelte": "^1.1.
|
|
15
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
16
|
+
"@rsbuild/plugin-svelte": "^1.1.1"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"svelte-check": "svelte-check --tsconfig ./tsconfig.json"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"svelte": "^5.53.
|
|
13
|
+
"svelte": "^5.53.12"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
17
|
-
"@rsbuild/plugin-svelte": "^1.1.
|
|
18
|
-
"svelte-check": "^4.4.
|
|
16
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
17
|
+
"@rsbuild/plugin-svelte": "^1.1.1",
|
|
18
|
+
"svelte-check": "^4.4.5",
|
|
19
19
|
"typescript": "^5.9.3"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"preview": "rsbuild preview"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"vue": "^3.5.
|
|
12
|
+
"vue": "^3.5.30"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
16
|
-
"@rsbuild/plugin-vue": "^1.2.
|
|
15
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
16
|
+
"@rsbuild/plugin-vue": "^1.2.7"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"preview": "rsbuild preview"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"vue": "^3.5.
|
|
12
|
+
"vue": "^3.5.30"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "^2.0.0-beta.
|
|
16
|
-
"@rsbuild/plugin-vue": "^1.2.
|
|
15
|
+
"@rsbuild/core": "^2.0.0-beta.7",
|
|
16
|
+
"@rsbuild/plugin-vue": "^1.2.7",
|
|
17
17
|
"typescript": "^5.9.3"
|
|
18
18
|
}
|
|
19
19
|
}
|