create-rsbuild 0.0.0-next-20231207110454 → 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,110 +1,19 @@
1
1
  # create-rsbuild
2
2
 
3
- ## 0.0.0-next-20231207110454
3
+ ## 0.0.0-next-20231220091832
4
4
 
5
- ## 0.1.9
5
+ ## 0.2.7
6
6
 
7
- ## 0.1.8
7
+ ## 0.2.6
8
8
 
9
- ## 0.1.7
9
+ ## 0.2.5
10
10
 
11
- ## 0.1.6
11
+ ## 0.2.4
12
12
 
13
- ## 0.1.5
13
+ ## 0.2.3
14
14
 
15
- ## 0.1.4
15
+ ## 0.2.2
16
16
 
17
- ### Patch Changes
17
+ ## 0.2.1
18
18
 
19
- - 8d09c89: feat: support solid-js HMR
20
-
21
- ## 0.1.3
22
-
23
- ## 0.1.2
24
-
25
- ## 0.1.1
26
-
27
- ## 0.1.0
28
-
29
- ### Patch Changes
30
-
31
- - 1090e387: feat(create-rsbuild): bump typescript to v5.3.0
32
-
33
- ## 0.0.28
34
-
35
- ## 0.0.27
36
-
37
- ## 0.0.26
38
-
39
- ## 0.0.25
40
-
41
- ## 0.0.24
42
-
43
- ## 0.0.23
44
-
45
- ## 0.0.22
46
-
47
- ### Patch Changes
48
-
49
- - 73cac183: feat(create-rsbuild): add new lit template
50
- - 6c00e30: fix(create-rsbuild): missing tsconfig.json in vanilla template
51
- - 6c00e30: feat(create-rsbuild): improve next steps message
52
- - 82e7c249: fix(create-rsbuild): incorrect title in sample code
53
-
54
- ## 0.0.21
55
-
56
- ### Patch Changes
57
-
58
- - a782b44: feat(create-rsbuild): add new vanilla template
59
-
60
- ## 0.0.20
61
-
62
- ## 0.0.19
63
-
64
- ## 0.0.18
65
-
66
- ### Patch Changes
67
-
68
- - 6f1c4a1: feat: add builtin assets and CSS modules types
69
- - eed4dcb: feat(create-rsbuild): update all pages in templates
70
- - a4485ea: feat(create-rspack): add dev --open option by default
71
-
72
- ## 0.0.17
73
-
74
- ## 0.0.16
75
-
76
- ### Patch Changes
77
-
78
- - 9a52542: feat: add default meta configs and simplify the templates
79
-
80
- ## 0.0.15
81
-
82
- ## 0.0.14
83
-
84
- ## 0.0.13
85
-
86
- ## 0.0.12
87
-
88
- ### Patch Changes
89
-
90
- - 50c2711: feat(create-rsbuild): always use the latest version
91
-
92
- ## 0.0.11
93
-
94
- ### Patch Changes
95
-
96
- - 8a4cf1e: fix(create-rsbuild): incorrect preview command
97
- - db6b547: feat(create-rsbuild): templates depend on latest version of Rsbuild
98
-
99
- ## 0.0.10
100
-
101
- ### Patch Changes
102
-
103
- - 3d261af: fix(create-rsbuild): failed to publish tsconfig of templates
104
-
105
- ## 0.0.9
106
-
107
- ### Patch Changes
108
-
109
- - 0fbab50: fix(create-rsbuild): failed to resolve the templates
110
- - e6be3a5: fix(create-rspack): skip local files for debugging
19
+ ## 0.2.0
package/dist/index.js CHANGED
@@ -93,7 +93,7 @@ async function main() {
93
93
  const commonFolder = import_path.default.join(packageRoot, `template-common`);
94
94
  const distFolder = import_path.default.join(cwd, targetDir);
95
95
  copyFolder(commonFolder, distFolder, version);
96
- copyFolder(srcFolder, distFolder, version);
96
+ copyFolder(srcFolder, distFolder, version, import_path.default.basename(targetDir));
97
97
  const nextSteps = [
98
98
  `cd ${targetDir}`,
99
99
  `${pkgManager} i`,
@@ -102,7 +102,7 @@ async function main() {
102
102
  (0, import_prompts.note)(nextSteps.join("\n"), "Next steps");
103
103
  (0, import_prompts.outro)("Done.");
104
104
  }
105
- function copyFolder(src, dist, version) {
105
+ function copyFolder(src, dist, version, name) {
106
106
  const renameFiles = {
107
107
  gitignore: ".gitignore"
108
108
  };
@@ -120,14 +120,17 @@ function copyFolder(src, dist, version) {
120
120
  } else {
121
121
  import_fs.default.copyFileSync(srcFile, distFile);
122
122
  if (file === "package.json") {
123
- replaceVersion(distFile, version);
123
+ updatePackageJson(distFile, version, name);
124
124
  }
125
125
  }
126
126
  }
127
127
  }
128
- const replaceVersion = (pkgJsonPath, version) => {
128
+ const updatePackageJson = (pkgJsonPath, version, name) => {
129
129
  let content = import_fs.default.readFileSync(pkgJsonPath, "utf-8");
130
130
  content = content.replace(/workspace:\*/g, `^${version}`);
131
- 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));
132
135
  };
133
136
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "0.0.0-next-20231207110454",
3
+ "version": "0.0.0-next-20231220091832",
4
4
  "description": "Create a new Rsbuild project",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -23,10 +23,10 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@clack/prompts": "^0.7.0",
26
- "rslog": "^1.1.1"
26
+ "rslog": "^1.1.2"
27
27
  },
28
28
  "devDependencies": {
29
- "@types/node": "^16",
29
+ "@types/node": "16.x",
30
30
  "typescript": "^5.3.0"
31
31
  },
32
32
  "publishConfig": {