create-rsbuild 0.0.9 → 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 ADDED
@@ -0,0 +1,21 @@
1
+ # create-rsbuild
2
+
3
+ ## 0.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 8a4cf1e: fix(create-rsbuild): incorrect preview command
8
+ - db6b547: feat(create-rsbuild): templates depend on latest version of Rsbuild
9
+
10
+ ## 0.0.10
11
+
12
+ ### Patch Changes
13
+
14
+ - 3d261af: fix(create-rsbuild): failed to publish tsconfig of templates
15
+
16
+ ## 0.0.9
17
+
18
+ ### Patch Changes
19
+
20
+ - 0fbab50: fix(create-rsbuild): failed to resolve the templates
21
+ - e6be3a5: fix(create-rspack): skip local files for debugging
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);
@@ -76,7 +77,7 @@ async function main() {
76
77
  const distFolder = import_path.default.join(cwd, targetDir);
77
78
  copyFolder(commonFolder, distFolder);
78
79
  copyFolder(srcFolder, distFolder);
79
- const nextSteps = [`cd ${targetDir}`, "npm i", "npm dev"];
80
+ const nextSteps = [`cd ${targetDir}`, "npm i", "npm run dev"];
80
81
  (0, import_prompts.note)(nextSteps.join("\n"), "Next steps");
81
82
  (0, import_prompts.outro)("Done.");
82
83
  }
@@ -0,0 +1,3 @@
1
+ import baseConfig from '../../scripts/modern.base.config';
2
+
3
+ export default baseConfig;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "directory": "packages/create-rsbuild"
9
9
  },
10
10
  "license": "MIT",
11
- "version": "0.0.9",
11
+ "version": "0.0.11",
12
12
  "types": "./dist/index.d.ts",
13
13
  "main": "./dist/index.js",
14
14
  "bin": {
@@ -30,7 +30,8 @@
30
30
  },
31
31
  "publishConfig": {
32
32
  "registry": "https://registry.npmjs.org/",
33
- "access": "public"
33
+ "access": "public",
34
+ "provenance": true
34
35
  },
35
36
  "scripts": {
36
37
  "dev": "modern build --watch",
@@ -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 serve
27
+ ```bash
28
+ pnpm preview
29
29
  ```
@@ -12,7 +12,7 @@
12
12
  "react-dom": "^18"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "nightly",
16
- "@rsbuild/plugin-react": "nightly"
15
+ "@rsbuild/core": "^0.0.10",
16
+ "@rsbuild/plugin-react": "^0.0.10"
17
17
  }
18
18
  }
@@ -12,8 +12,8 @@
12
12
  "react-dom": "^18"
13
13
  },
14
14
  "devDependencies": {
15
- "@rsbuild/core": "nightly",
16
- "@rsbuild/plugin-react": "nightly",
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,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "lib": ["DOM", "ES2020"],
5
+ "module": "ESNext",
6
+ "jsx": "react-jsx",
7
+ "strict": true,
8
+ "skipLibCheck": true,
9
+ "isolatedModules": true,
10
+ "resolveJsonModule": true,
11
+ "moduleResolution": "bundler"
12
+ },
13
+ "include": ["src"]
14
+ }
@@ -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,6 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginSvelte } from '@rsbuild/plugin-svelte';
3
+
4
+ export default defineConfig({
5
+ plugins: [pluginSvelte()],
6
+ });
@@ -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,12 @@
1
+ import './global.css';
2
+
3
+ import App from './App.svelte';
4
+
5
+ const app = new App({
6
+ target: document.body,
7
+ props: {
8
+ name: 'world',
9
+ },
10
+ });
11
+
12
+ export default app;
@@ -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,6 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginSvelte } from '@rsbuild/plugin-svelte';
3
+
4
+ export default defineConfig({
5
+ plugins: [pluginSvelte()],
6
+ });
@@ -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,12 @@
1
+ import './global.css';
2
+
3
+ import App from './App.svelte';
4
+
5
+ const app = new App({
6
+ target: document.body,
7
+ props: {
8
+ name: 'world',
9
+ },
10
+ });
11
+
12
+ export default app;
@@ -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
+ }
@@ -11,7 +11,7 @@
11
11
  "vue": "^2.7.14"
12
12
  },
13
13
  "devDependencies": {
14
- "@rsbuild/core": "nightly",
15
- "@rsbuild/plugin-vue2": "nightly"
14
+ "@rsbuild/core": "^0.0.10",
15
+ "@rsbuild/plugin-vue2": "^0.0.10"
16
16
  }
17
17
  }
@@ -11,8 +11,8 @@
11
11
  "vue": "^2.7.14"
12
12
  },
13
13
  "devDependencies": {
14
- "@rsbuild/core": "nightly",
15
- "@rsbuild/plugin-vue2": "nightly",
14
+ "@rsbuild/core": "^0.0.10",
15
+ "@rsbuild/plugin-vue2": "^0.0.10",
16
16
  "typescript": "^5.0.0"
17
17
  }
18
18
  }
@@ -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
+ }
@@ -11,7 +11,7 @@
11
11
  "vue": "^3.0.0"
12
12
  },
13
13
  "devDependencies": {
14
- "@rsbuild/core": "nightly",
15
- "@rsbuild/plugin-vue": "nightly"
14
+ "@rsbuild/core": "^0.0.10",
15
+ "@rsbuild/plugin-vue": "^0.0.10"
16
16
  }
17
17
  }
@@ -11,8 +11,8 @@
11
11
  "vue": "^3.0.0"
12
12
  },
13
13
  "devDependencies": {
14
- "@rsbuild/core": "nightly",
15
- "@rsbuild/plugin-vue": "nightly",
14
+ "@rsbuild/core": "^0.0.10",
15
+ "@rsbuild/plugin-vue": "^0.0.10",
16
16
  "typescript": "^5.0.0"
17
17
  }
18
18
  }
@@ -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
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "@rsbuild/tsconfig/base",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "baseUrl": "./"
6
+ },
7
+ "include": ["src"]
8
+ }