create-rsbuild 0.0.10 → 0.0.11
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 +7 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/template-common/README.md +4 -4
- package/template-react-js/package.json +2 -2
- package/template-react-ts/package.json +2 -2
- package/template-svelte-js/package.json +17 -0
- package/template-svelte-js/rsbuild.config.mjs +6 -0
- package/template-svelte-js/src/App.svelte +33 -0
- package/template-svelte-js/src/global.css +68 -0
- package/template-svelte-js/src/index.js +12 -0
- package/template-svelte-ts/package.json +18 -0
- package/template-svelte-ts/rsbuild.config.ts +6 -0
- package/template-svelte-ts/src/App.svelte +33 -0
- package/template-svelte-ts/src/global.css +68 -0
- package/template-svelte-ts/src/index.ts +12 -0
- package/template-svelte-ts/tsconfig.json +13 -0
- package/template-vue2-js/package.json +2 -2
- package/template-vue2-ts/package.json +2 -2
- package/template-vue3-js/package.json +2 -2
- package/template-vue3-ts/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -59,7 +59,8 @@ async function main() {
|
|
|
59
59
|
options: [
|
|
60
60
|
{ value: "react", label: "React" },
|
|
61
61
|
{ value: "vue3", label: "Vue 3" },
|
|
62
|
-
{ value: "vue2", label: "Vue 2" }
|
|
62
|
+
{ value: "vue2", label: "Vue 2" },
|
|
63
|
+
{ value: "svelte", label: "Svelte" }
|
|
63
64
|
]
|
|
64
65
|
});
|
|
65
66
|
checkCancel(framework);
|
package/package.json
CHANGED
|
@@ -12,18 +12,18 @@ pnpm install
|
|
|
12
12
|
|
|
13
13
|
Start the dev server:
|
|
14
14
|
|
|
15
|
-
```
|
|
15
|
+
```bash
|
|
16
16
|
pnpm dev
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Build the app for production:
|
|
20
20
|
|
|
21
|
-
```
|
|
21
|
+
```bash
|
|
22
22
|
pnpm build
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Preview the production build locally:
|
|
26
26
|
|
|
27
|
-
```
|
|
28
|
-
pnpm
|
|
27
|
+
```bash
|
|
28
|
+
pnpm preview
|
|
29
29
|
```
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"react-dom": "^18"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@rsbuild/core": "
|
|
16
|
-
"@rsbuild/plugin-react": "
|
|
15
|
+
"@rsbuild/core": "^0.0.10",
|
|
16
|
+
"@rsbuild/plugin-react": "^0.0.10",
|
|
17
17
|
"@types/react": "^18",
|
|
18
18
|
"@types/react-dom": "^18",
|
|
19
19
|
"typescript": "^5.0.0"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-svelte-js",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"svelte": "^4.2.2"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@rsbuild/core": "^0.0.10",
|
|
15
|
+
"@rsbuild/plugin-svelte": "^0.0.10"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let name;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<main>
|
|
6
|
+
<h1>Hello {name}!</h1>
|
|
7
|
+
<p>
|
|
8
|
+
Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn
|
|
9
|
+
how to build Svelte apps.
|
|
10
|
+
</p>
|
|
11
|
+
</main>
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
main {
|
|
15
|
+
text-align: center;
|
|
16
|
+
padding: 1em;
|
|
17
|
+
max-width: 240px;
|
|
18
|
+
margin: 0 auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media (min-width: 640px) {
|
|
22
|
+
main {
|
|
23
|
+
max-width: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
h1 {
|
|
28
|
+
color: #ff3e00;
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
font-size: 4em;
|
|
31
|
+
font-weight: 100;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
html,
|
|
2
|
+
body {
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
color: #333;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 8px;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
14
|
+
Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
color: rgb(0, 100, 200);
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
a:hover {
|
|
23
|
+
text-decoration: underline;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
a:visited {
|
|
27
|
+
color: rgb(0, 80, 160);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
label {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
input,
|
|
35
|
+
button,
|
|
36
|
+
select,
|
|
37
|
+
textarea {
|
|
38
|
+
font-family: inherit;
|
|
39
|
+
font-size: inherit;
|
|
40
|
+
-webkit-padding: 0.4em 0;
|
|
41
|
+
padding: 0.4em;
|
|
42
|
+
margin: 0 0 0.5em 0;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
border: 1px solid #ccc;
|
|
45
|
+
border-radius: 2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
input:disabled {
|
|
49
|
+
color: #ccc;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
button {
|
|
53
|
+
color: #333;
|
|
54
|
+
background-color: #f4f4f4;
|
|
55
|
+
outline: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
button:disabled {
|
|
59
|
+
color: #999;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
button:not(:disabled):active {
|
|
63
|
+
background-color: #ddd;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
button:focus {
|
|
67
|
+
border-color: #666;
|
|
68
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rsbuild-svelte-ts",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"svelte": "^4.2.2"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@rsbuild/core": "^0.0.10",
|
|
15
|
+
"@rsbuild/plugin-svelte": "^0.0.10",
|
|
16
|
+
"typescript": "^5.0.0"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let name;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<main>
|
|
6
|
+
<h1>Hello {name}!</h1>
|
|
7
|
+
<p>
|
|
8
|
+
Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn
|
|
9
|
+
how to build Svelte apps.
|
|
10
|
+
</p>
|
|
11
|
+
</main>
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
main {
|
|
15
|
+
text-align: center;
|
|
16
|
+
padding: 1em;
|
|
17
|
+
max-width: 240px;
|
|
18
|
+
margin: 0 auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media (min-width: 640px) {
|
|
22
|
+
main {
|
|
23
|
+
max-width: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
h1 {
|
|
28
|
+
color: #ff3e00;
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
font-size: 4em;
|
|
31
|
+
font-weight: 100;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
html,
|
|
2
|
+
body {
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
color: #333;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 8px;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
14
|
+
Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
color: rgb(0, 100, 200);
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
a:hover {
|
|
23
|
+
text-decoration: underline;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
a:visited {
|
|
27
|
+
color: rgb(0, 80, 160);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
label {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
input,
|
|
35
|
+
button,
|
|
36
|
+
select,
|
|
37
|
+
textarea {
|
|
38
|
+
font-family: inherit;
|
|
39
|
+
font-size: inherit;
|
|
40
|
+
-webkit-padding: 0.4em 0;
|
|
41
|
+
padding: 0.4em;
|
|
42
|
+
margin: 0 0 0.5em 0;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
border: 1px solid #ccc;
|
|
45
|
+
border-radius: 2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
input:disabled {
|
|
49
|
+
color: #ccc;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
button {
|
|
53
|
+
color: #333;
|
|
54
|
+
background-color: #f4f4f4;
|
|
55
|
+
outline: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
button:disabled {
|
|
59
|
+
color: #999;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
button:not(:disabled):active {
|
|
63
|
+
background-color: #ddd;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
button:focus {
|
|
67
|
+
border-color: #666;
|
|
68
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
},
|
|
12
|
+
"include": ["src"]
|
|
13
|
+
}
|