create-rsbuild 0.0.0-nightly-20231111160817 → 0.0.0-nightly-20240114070311
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/CHANGELOG.md +25 -27
- package/README.md +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +32 -9
- package/package.json +5 -4
- package/template-lit-js/package.json +14 -0
- package/template-lit-js/rsbuild.config.mjs +7 -0
- package/template-lit-js/src/index.css +6 -0
- package/template-lit-js/src/index.html +5 -0
- package/template-lit-js/src/index.js +4 -0
- package/template-lit-js/src/my-element.js +34 -0
- package/template-lit-ts/package.json +15 -0
- package/template-lit-ts/rsbuild.config.ts +7 -0
- package/template-lit-ts/src/env.d.ts +1 -0
- package/template-lit-ts/src/index.css +6 -0
- package/template-lit-ts/src/index.html +5 -0
- package/template-lit-ts/src/index.ts +4 -0
- package/template-lit-ts/src/my-element.ts +34 -0
- package/template-lit-ts/tsconfig.json +14 -0
- package/template-preact-js/package.json +17 -0
- package/template-preact-js/rsbuild.config.mjs +6 -0
- package/template-preact-js/src/App.css +26 -0
- package/template-preact-js/src/App.jsx +12 -0
- package/template-preact-js/src/index.jsx +4 -0
- package/template-preact-ts/package.json +18 -0
- package/template-preact-ts/rsbuild.config.ts +6 -0
- package/template-preact-ts/src/App.css +26 -0
- package/template-preact-ts/src/App.tsx +12 -0
- package/template-preact-ts/src/index.tsx +4 -0
- package/template-preact-ts/tsconfig.json +20 -0
- package/template-react-ts/package.json +3 -3
- package/template-react-ts/tsconfig.json +2 -1
- package/template-solid-js/package.json +18 -0
- package/template-solid-js/rsbuild.config.mjs +13 -0
- package/template-solid-js/src/App.css +26 -0
- package/template-solid-js/src/App.jsx +12 -0
- package/template-solid-js/src/index.jsx +4 -0
- package/template-solid-ts/package.json +19 -0
- package/template-solid-ts/rsbuild.config.ts +13 -0
- package/template-solid-ts/src/App.css +26 -0
- package/template-solid-ts/src/App.tsx +12 -0
- package/template-solid-ts/src/env.d.ts +1 -0
- package/template-solid-ts/src/index.tsx +4 -0
- package/template-solid-ts/tsconfig.json +16 -0
- package/template-svelte-ts/package.json +1 -1
- package/template-svelte-ts/tsconfig.json +2 -1
- package/template-vanilla-js/package.json +13 -0
- package/template-vanilla-js/rsbuild.config.mjs +3 -0
- package/template-vanilla-js/src/index.css +26 -0
- package/template-vanilla-js/src/index.js +8 -0
- package/template-vanilla-ts/package.json +14 -0
- package/template-vanilla-ts/rsbuild.config.ts +3 -0
- package/template-vanilla-ts/src/index.css +26 -0
- package/template-vanilla-ts/src/index.ts +8 -0
- package/template-vanilla-ts/tsconfig.json +14 -0
- package/template-vue2-ts/package.json +1 -1
- package/template-vue2-ts/tsconfig.json +3 -1
- package/template-vue3-js/.vscode/extensions.json +3 -0
- package/template-vue3-ts/.vscode/extensions.json +3 -0
- package/template-vue3-ts/package.json +1 -1
- package/template-vue3-ts/src/env.d.ts +0 -7
- package/template-vue3-ts/tsconfig.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,53 +1,51 @@
|
|
|
1
1
|
# create-rsbuild
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20240114070311
|
|
4
4
|
|
|
5
|
-
## 0.
|
|
5
|
+
## 0.3.2
|
|
6
6
|
|
|
7
|
-
## 0.
|
|
7
|
+
## 0.3.1
|
|
8
8
|
|
|
9
9
|
### Patch Changes
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
- eed4dcb: feat(create-rsbuild): update all pages in templates
|
|
13
|
-
- a4485ea: feat(create-rspack): add dev --open option by default
|
|
11
|
+
- 7b877865: feat(create-rsbuild): add extensions config for Vue projects
|
|
14
12
|
|
|
15
|
-
## 0.0
|
|
13
|
+
## 0.3.0
|
|
16
14
|
|
|
17
|
-
## 0.
|
|
15
|
+
## 0.2.18
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
## 0.2.17
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
## 0.2.16
|
|
22
20
|
|
|
23
|
-
## 0.
|
|
21
|
+
## 0.2.15
|
|
24
22
|
|
|
25
|
-
## 0.
|
|
23
|
+
## 0.2.14
|
|
26
24
|
|
|
27
|
-
## 0.
|
|
25
|
+
## 0.2.13
|
|
28
26
|
|
|
29
|
-
## 0.
|
|
27
|
+
## 0.2.12
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
## 0.2.11
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
## 0.2.10
|
|
34
32
|
|
|
35
|
-
## 0.
|
|
33
|
+
## 0.2.9
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
## 0.2.8
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
- db6b547: feat(create-rsbuild): templates depend on latest version of Rsbuild
|
|
37
|
+
## 0.2.7
|
|
41
38
|
|
|
42
|
-
## 0.
|
|
39
|
+
## 0.2.6
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
## 0.2.5
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
## 0.2.4
|
|
47
44
|
|
|
48
|
-
## 0.
|
|
45
|
+
## 0.2.3
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
## 0.2.2
|
|
48
|
+
|
|
49
|
+
## 0.2.1
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
- e6be3a5: fix(create-rspack): skip local files for debugging
|
|
51
|
+
## 0.2.0
|
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export {};
|
|
2
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -35,10 +35,22 @@ function checkCancel(value) {
|
|
|
35
35
|
function formatTargetDir(targetDir) {
|
|
36
36
|
return targetDir.trim().replace(/\/+$/g, "");
|
|
37
37
|
}
|
|
38
|
+
function pkgFromUserAgent(userAgent) {
|
|
39
|
+
if (!userAgent)
|
|
40
|
+
return void 0;
|
|
41
|
+
const pkgSpec = userAgent.split(" ")[0];
|
|
42
|
+
const pkgSpecArr = pkgSpec.split("/");
|
|
43
|
+
return {
|
|
44
|
+
name: pkgSpecArr[0],
|
|
45
|
+
version: pkgSpecArr[1]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
38
48
|
async function main() {
|
|
39
49
|
console.log("");
|
|
40
50
|
import_rslog.logger.greet("◆ Create Rsbuild Project");
|
|
41
51
|
const cwd = process.cwd();
|
|
52
|
+
const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent);
|
|
53
|
+
const pkgManager = pkgInfo ? pkgInfo.name : "npm";
|
|
42
54
|
const packageRoot = import_path.default.resolve(__dirname, "..");
|
|
43
55
|
const packageJsonPath = import_path.default.join(packageRoot, "package.json");
|
|
44
56
|
const { version } = require(packageJsonPath);
|
|
@@ -47,7 +59,7 @@ async function main() {
|
|
|
47
59
|
placeholder: "my-project",
|
|
48
60
|
validate(value) {
|
|
49
61
|
if (value.length === 0) {
|
|
50
|
-
return
|
|
62
|
+
return "Target folder is required";
|
|
51
63
|
}
|
|
52
64
|
if (import_fs.default.existsSync(import_path.default.join(cwd, value))) {
|
|
53
65
|
return `"${value}" is not empty, please input another folder`;
|
|
@@ -62,7 +74,11 @@ async function main() {
|
|
|
62
74
|
{ value: "react", label: "React" },
|
|
63
75
|
{ value: "vue3", label: "Vue 3" },
|
|
64
76
|
{ value: "vue2", label: "Vue 2" },
|
|
65
|
-
{ value: "
|
|
77
|
+
{ value: "lit", label: "Lit" },
|
|
78
|
+
{ value: "preact", label: "Preact" },
|
|
79
|
+
{ value: "svelte", label: "Svelte" },
|
|
80
|
+
{ value: "solid", label: "Solid" },
|
|
81
|
+
{ value: "vanilla", label: "Vanilla" }
|
|
66
82
|
]
|
|
67
83
|
});
|
|
68
84
|
checkCancel(framework);
|
|
@@ -75,15 +91,19 @@ async function main() {
|
|
|
75
91
|
});
|
|
76
92
|
checkCancel(language);
|
|
77
93
|
const srcFolder = import_path.default.join(packageRoot, `template-${framework}-${language}`);
|
|
78
|
-
const commonFolder = import_path.default.join(packageRoot,
|
|
94
|
+
const commonFolder = import_path.default.join(packageRoot, "template-common");
|
|
79
95
|
const distFolder = import_path.default.join(cwd, targetDir);
|
|
80
96
|
copyFolder(commonFolder, distFolder, version);
|
|
81
|
-
copyFolder(srcFolder, distFolder, version);
|
|
82
|
-
const nextSteps = [
|
|
97
|
+
copyFolder(srcFolder, distFolder, version, import_path.default.basename(targetDir));
|
|
98
|
+
const nextSteps = [
|
|
99
|
+
`cd ${targetDir}`,
|
|
100
|
+
`${pkgManager} i`,
|
|
101
|
+
`${pkgManager} run dev`
|
|
102
|
+
];
|
|
83
103
|
(0, import_prompts.note)(nextSteps.join("\n"), "Next steps");
|
|
84
104
|
(0, import_prompts.outro)("Done.");
|
|
85
105
|
}
|
|
86
|
-
function copyFolder(src, dist, version) {
|
|
106
|
+
function copyFolder(src, dist, version, name) {
|
|
87
107
|
const renameFiles = {
|
|
88
108
|
gitignore: ".gitignore"
|
|
89
109
|
};
|
|
@@ -101,14 +121,17 @@ function copyFolder(src, dist, version) {
|
|
|
101
121
|
} else {
|
|
102
122
|
import_fs.default.copyFileSync(srcFile, distFile);
|
|
103
123
|
if (file === "package.json") {
|
|
104
|
-
|
|
124
|
+
updatePackageJson(distFile, version, name);
|
|
105
125
|
}
|
|
106
126
|
}
|
|
107
127
|
}
|
|
108
128
|
}
|
|
109
|
-
const
|
|
129
|
+
const updatePackageJson = (pkgJsonPath, version, name) => {
|
|
110
130
|
let content = import_fs.default.readFileSync(pkgJsonPath, "utf-8");
|
|
111
131
|
content = content.replace(/workspace:\*/g, `^${version}`);
|
|
112
|
-
|
|
132
|
+
const pkg = JSON.parse(content);
|
|
133
|
+
if (name)
|
|
134
|
+
pkg.name = name;
|
|
135
|
+
import_fs.default.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2));
|
|
113
136
|
};
|
|
114
137
|
main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rsbuild",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240114070311",
|
|
4
4
|
"description": "Create a new Rsbuild project",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"directory": "packages/create-rsbuild"
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
|
+
"type": "commonjs",
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
14
15
|
"types": "./dist/index.d.ts",
|
|
@@ -22,11 +23,11 @@
|
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"@clack/prompts": "^0.7.0",
|
|
25
|
-
"rslog": "^1.
|
|
26
|
+
"rslog": "^1.2.0"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@types/node": "
|
|
29
|
-
"typescript": "^5.
|
|
29
|
+
"@types/node": "16.x",
|
|
30
|
+
"typescript": "^5.3.0"
|
|
30
31
|
},
|
|
31
32
|
"publishConfig": {
|
|
32
33
|
"access": "public",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-lit-js",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev --open",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@rsbuild/core": "workspace:*",
|
|
12
|
+
"lit": "^3.0.2"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export class MyElement extends LitElement {
|
|
4
|
+
static styles = css`
|
|
5
|
+
.content {
|
|
6
|
+
display: flex;
|
|
7
|
+
min-height: 100vh;
|
|
8
|
+
line-height: 1.1;
|
|
9
|
+
text-align: center;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.content h1 {
|
|
15
|
+
font-size: 3.6rem;
|
|
16
|
+
font-weight: 700;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.content p {
|
|
20
|
+
font-size: 1.2rem;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
opacity: 0.5;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
render() {
|
|
27
|
+
return html`
|
|
28
|
+
<div class="content">
|
|
29
|
+
<h1>Rsbuild with Lit</h1>
|
|
30
|
+
<p>Start building amazing things with Rsbuild.</p>
|
|
31
|
+
</div>
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-lit-ts",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev --open",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@rsbuild/core": "workspace:*",
|
|
12
|
+
"lit": "^3.0.2",
|
|
13
|
+
"typescript": "^5.3.0"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="@rsbuild/core/types" />
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export class MyElement extends LitElement {
|
|
4
|
+
static styles = css`
|
|
5
|
+
.content {
|
|
6
|
+
display: flex;
|
|
7
|
+
min-height: 100vh;
|
|
8
|
+
line-height: 1.1;
|
|
9
|
+
text-align: center;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.content h1 {
|
|
15
|
+
font-size: 3.6rem;
|
|
16
|
+
font-weight: 700;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.content p {
|
|
20
|
+
font-size: 1.2rem;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
opacity: 0.5;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
render() {
|
|
27
|
+
return html`
|
|
28
|
+
<div class="content">
|
|
29
|
+
<h1>Rsbuild with Lit</h1>
|
|
30
|
+
<p>Start building amazing things with Rsbuild.</p>
|
|
31
|
+
</div>
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"lib": ["DOM", "ES2020"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"useDefineForClassFields": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-preact-js",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev --open",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"preact": "^10.19.3"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@rsbuild/core": "workspace:*",
|
|
15
|
+
"@rsbuild/plugin-preact": "workspace:*"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -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,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-preact-ts",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev --open",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"preact": "^10.19.3"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@rsbuild/core": "workspace:*",
|
|
15
|
+
"@rsbuild/plugin-preact": "workspace:*",
|
|
16
|
+
"typescript": "^5.3.0"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"lib": ["DOM", "ES2020"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"jsxImportSource": "preact",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"useDefineForClassFields": true,
|
|
14
|
+
"paths": {
|
|
15
|
+
"react": ["./node_modules/preact/compat/"],
|
|
16
|
+
"react-dom": ["./node_modules/preact/compat/"]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"include": ["src"]
|
|
20
|
+
}
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@rsbuild/core": "workspace:*",
|
|
16
16
|
"@rsbuild/plugin-react": "workspace:*",
|
|
17
|
-
"@types/react": "^18",
|
|
18
|
-
"@types/react-dom": "^18",
|
|
19
|
-
"typescript": "^5.
|
|
17
|
+
"@types/react": "^18.2.47",
|
|
18
|
+
"@types/react-dom": "^18.2.18",
|
|
19
|
+
"typescript": "^5.3.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-solid-js",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev --open",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"solid-js": "^1.8.5"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@rsbuild/core": "workspace:*",
|
|
15
|
+
"@rsbuild/plugin-babel": "workspace:*",
|
|
16
|
+
"@rsbuild/plugin-solid": "workspace:*"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from '@rsbuild/core';
|
|
2
|
+
import { pluginBabel } from '@rsbuild/plugin-babel';
|
|
3
|
+
import { pluginSolid } from '@rsbuild/plugin-solid';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [
|
|
7
|
+
pluginBabel({
|
|
8
|
+
include: /\.(?:jsx|tsx)$/,
|
|
9
|
+
exclude: /[\\/]node_modules[\\/]/,
|
|
10
|
+
}),
|
|
11
|
+
pluginSolid(),
|
|
12
|
+
],
|
|
13
|
+
});
|
|
@@ -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,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-solid-ts",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev --open",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"solid-js": "^1.8.5"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@rsbuild/core": "workspace:*",
|
|
15
|
+
"@rsbuild/plugin-babel": "workspace:*",
|
|
16
|
+
"@rsbuild/plugin-solid": "workspace:*",
|
|
17
|
+
"typescript": "^5.3.0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from '@rsbuild/core';
|
|
2
|
+
import { pluginBabel } from '@rsbuild/plugin-babel';
|
|
3
|
+
import { pluginSolid } from '@rsbuild/plugin-solid';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [
|
|
7
|
+
pluginBabel({
|
|
8
|
+
include: /\.(?:jsx|tsx)$/,
|
|
9
|
+
exclude: /[\\/]node_modules[\\/]/,
|
|
10
|
+
}),
|
|
11
|
+
pluginSolid(),
|
|
12
|
+
],
|
|
13
|
+
});
|
|
@@ -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 @@
|
|
|
1
|
+
/// <reference types="@rsbuild/core/types" />
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"lib": ["DOM", "ES2020"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"jsxImportSource": "solid-js",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"useDefineForClassFields": true
|
|
14
|
+
},
|
|
15
|
+
"include": ["src"]
|
|
16
|
+
}
|
|
@@ -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,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-vanilla-ts",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev --open",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@rsbuild/core": "workspace:*",
|
|
12
|
+
"typescript": "^5.3.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -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,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"lib": ["DOM", "ES2020"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"useDefineForClassFields": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
"target": "ES2020",
|
|
4
4
|
"lib": ["DOM", "ES2020"],
|
|
5
5
|
"module": "ESNext",
|
|
6
|
+
"jsx": "preserve",
|
|
6
7
|
"strict": true,
|
|
7
8
|
"skipLibCheck": true,
|
|
8
9
|
"isolatedModules": true,
|
|
9
10
|
"resolveJsonModule": true,
|
|
10
|
-
"moduleResolution": "bundler"
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"useDefineForClassFields": true
|
|
11
13
|
},
|
|
12
14
|
"include": ["src"]
|
|
13
15
|
}
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
"target": "ES2020",
|
|
4
4
|
"lib": ["DOM", "ES2020"],
|
|
5
5
|
"module": "ESNext",
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"jsxImportSource": "vue",
|
|
6
8
|
"strict": true,
|
|
7
9
|
"skipLibCheck": true,
|
|
8
10
|
"isolatedModules": true,
|
|
9
11
|
"resolveJsonModule": true,
|
|
10
|
-
"moduleResolution": "bundler"
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"useDefineForClassFields": true
|
|
11
14
|
},
|
|
12
15
|
"include": ["src"]
|
|
13
16
|
}
|