create-rsbuild 0.0.0-next-20231115072032 → 0.0.0-next-20231220091832

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 CHANGED
@@ -1,70 +1,19 @@
1
1
  # create-rsbuild
2
2
 
3
- ## 0.0.0-next-20231115072032
3
+ ## 0.0.0-next-20231220091832
4
4
 
5
- ## 0.0.22
5
+ ## 0.2.7
6
6
 
7
- ### Patch Changes
7
+ ## 0.2.6
8
8
 
9
- - 73cac183: feat(create-rsbuild): add new lit template
10
- - 6c00e30: fix(create-rsbuild): missing tsconfig.json in vanilla template
11
- - 6c00e30: feat(create-rsbuild): improve next steps message
12
- - 82e7c249: fix(create-rsbuild): incorrect title in sample code
9
+ ## 0.2.5
13
10
 
14
- ## 0.0.21
11
+ ## 0.2.4
15
12
 
16
- ### Patch Changes
13
+ ## 0.2.3
17
14
 
18
- - a782b44: feat(create-rsbuild): add new vanilla template
15
+ ## 0.2.2
19
16
 
20
- ## 0.0.20
17
+ ## 0.2.1
21
18
 
22
- ## 0.0.19
23
-
24
- ## 0.0.18
25
-
26
- ### Patch Changes
27
-
28
- - 6f1c4a1: feat: add builtin assets and CSS modules types
29
- - eed4dcb: feat(create-rsbuild): update all pages in templates
30
- - a4485ea: feat(create-rspack): add dev --open option by default
31
-
32
- ## 0.0.17
33
-
34
- ## 0.0.16
35
-
36
- ### Patch Changes
37
-
38
- - 9a52542: feat: add default meta configs and simplify the templates
39
-
40
- ## 0.0.15
41
-
42
- ## 0.0.14
43
-
44
- ## 0.0.13
45
-
46
- ## 0.0.12
47
-
48
- ### Patch Changes
49
-
50
- - 50c2711: feat(create-rsbuild): always use the latest version
51
-
52
- ## 0.0.11
53
-
54
- ### Patch Changes
55
-
56
- - 8a4cf1e: fix(create-rsbuild): incorrect preview command
57
- - db6b547: feat(create-rsbuild): templates depend on latest version of Rsbuild
58
-
59
- ## 0.0.10
60
-
61
- ### Patch Changes
62
-
63
- - 3d261af: fix(create-rsbuild): failed to publish tsconfig of templates
64
-
65
- ## 0.0.9
66
-
67
- ### Patch Changes
68
-
69
- - 0fbab50: fix(create-rsbuild): failed to resolve the templates
70
- - e6be3a5: fix(create-rspack): skip local files for debugging
19
+ ## 0.2.0
package/dist/index.js CHANGED
@@ -76,6 +76,7 @@ async function main() {
76
76
  { value: "vue2", label: "Vue 2" },
77
77
  { value: "lit", label: "Lit" },
78
78
  { value: "svelte", label: "Svelte" },
79
+ { value: "solid", label: "Solid" },
79
80
  { value: "vanilla", label: "Vanilla" }
80
81
  ]
81
82
  });
@@ -92,12 +93,16 @@ async function main() {
92
93
  const commonFolder = import_path.default.join(packageRoot, `template-common`);
93
94
  const distFolder = import_path.default.join(cwd, targetDir);
94
95
  copyFolder(commonFolder, distFolder, version);
95
- copyFolder(srcFolder, distFolder, version);
96
- const nextSteps = [`cd ${targetDir}`, `${pkgManager} i`, `${pkgManager} run dev`];
96
+ copyFolder(srcFolder, distFolder, version, import_path.default.basename(targetDir));
97
+ const nextSteps = [
98
+ `cd ${targetDir}`,
99
+ `${pkgManager} i`,
100
+ `${pkgManager} run dev`
101
+ ];
97
102
  (0, import_prompts.note)(nextSteps.join("\n"), "Next steps");
98
103
  (0, import_prompts.outro)("Done.");
99
104
  }
100
- function copyFolder(src, dist, version) {
105
+ function copyFolder(src, dist, version, name) {
101
106
  const renameFiles = {
102
107
  gitignore: ".gitignore"
103
108
  };
@@ -115,14 +120,17 @@ function copyFolder(src, dist, version) {
115
120
  } else {
116
121
  import_fs.default.copyFileSync(srcFile, distFile);
117
122
  if (file === "package.json") {
118
- replaceVersion(distFile, version);
123
+ updatePackageJson(distFile, version, name);
119
124
  }
120
125
  }
121
126
  }
122
127
  }
123
- const replaceVersion = (pkgJsonPath, version) => {
128
+ const updatePackageJson = (pkgJsonPath, version, name) => {
124
129
  let content = import_fs.default.readFileSync(pkgJsonPath, "utf-8");
125
130
  content = content.replace(/workspace:\*/g, `^${version}`);
126
- import_fs.default.writeFileSync(pkgJsonPath, content);
131
+ const pkg = JSON.parse(content);
132
+ if (name)
133
+ pkg.name = name;
134
+ import_fs.default.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2));
127
135
  };
128
136
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "0.0.0-next-20231115072032",
3
+ "version": "0.0.0-next-20231220091832",
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.1.1"
26
+ "rslog": "^1.1.2"
26
27
  },
27
28
  "devDependencies": {
28
- "@types/node": "^16",
29
- "typescript": "^5.2.2"
29
+ "@types/node": "16.x",
30
+ "typescript": "^5.3.0"
30
31
  },
31
32
  "publishConfig": {
32
33
  "access": "public",
@@ -10,6 +10,6 @@
10
10
  "devDependencies": {
11
11
  "@rsbuild/core": "workspace:*",
12
12
  "lit": "^3.0.2",
13
- "typescript": "^5.2.2"
13
+ "typescript": "^5.3.0"
14
14
  }
15
15
  }
@@ -16,6 +16,6 @@
16
16
  "@rsbuild/plugin-react": "workspace:*",
17
17
  "@types/react": "^18",
18
18
  "@types/react-dom": "^18",
19
- "typescript": "^5.2.2"
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,7 @@
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: [pluginBabel(), pluginSolid()],
7
+ });
@@ -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 class="content">
6
+ <h1>Rsbuild with Solid</h1>
7
+ <p>Start building amazing things with Rsbuild.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1,4 @@
1
+ import { render } from 'solid-js/web';
2
+ import App from './App';
3
+
4
+ render(() => <App />, document.getElementById('root'));
@@ -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,7 @@
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: [pluginBabel(), pluginSolid()],
7
+ });
@@ -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 class="content">
6
+ <h1>Rsbuild with Solid</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,4 @@
1
+ import { render } from 'solid-js/web';
2
+ import App from './App';
3
+
4
+ render(() => <App />, document.getElementById('root')!);
@@ -0,0 +1,15 @@
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
+ },
14
+ "include": ["src"]
15
+ }
@@ -13,6 +13,6 @@
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-svelte": "workspace:*",
16
- "typescript": "^5.2.2"
16
+ "typescript": "^5.3.0"
17
17
  }
18
18
  }
@@ -9,6 +9,6 @@
9
9
  },
10
10
  "devDependencies": {
11
11
  "@rsbuild/core": "workspace:*",
12
- "typescript": "^5.2.2"
12
+ "typescript": "^5.3.0"
13
13
  }
14
14
  }
@@ -13,6 +13,6 @@
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-vue2": "workspace:*",
16
- "typescript": "^5.2.2"
16
+ "typescript": "^5.3.0"
17
17
  }
18
18
  }
@@ -13,6 +13,6 @@
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-vue": "workspace:*",
16
- "typescript": "^5.2.2"
16
+ "typescript": "^5.3.0"
17
17
  }
18
18
  }