create-blocklet 0.4.71 → 0.4.73

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.
File without changes
File without changes
package/index.js CHANGED
@@ -16,7 +16,6 @@ import { checkServerInstalled, checkServerRunning, checkSatisfiedVersion, getSer
16
16
  import { toBlockletDid } from './lib/did.js';
17
17
  import { initGitRepo } from './lib/git.js';
18
18
  import {
19
- copy,
20
19
  emptyDir,
21
20
  isEmpty,
22
21
  isValidPackageName,
@@ -115,12 +114,7 @@ const templates = [
115
114
  },
116
115
  ];
117
116
 
118
- const renameFiles = {
119
- _gitignore: '.gitignore',
120
- _npmrc: '.npmrc',
121
- _editorconfig: '.editorconfig',
122
- _prettierrc: '.prettierrc',
123
- };
117
+
124
118
 
125
119
  async function init() {
126
120
  const { version } = await fs.readJSONSync(path.resolve(__dirname, 'package.json'));
@@ -266,7 +260,7 @@ async function init() {
266
260
  if (mainBlocklet) {
267
261
  await checkLerna();
268
262
  await checkYarn();
269
- copy(path.join(__dirname, 'templates', 'monorepo'), root);
263
+ fs.copySync(path.join(__dirname, 'templates', 'monorepo'), root);
270
264
  }
271
265
 
272
266
  for (const templateName of templateNames) {
@@ -279,7 +273,7 @@ async function init() {
279
273
  const commonFiles = fs.readdirSync(commonDir);
280
274
  for (const file of commonFiles) {
281
275
  // 如果选择多个模板,每个子 package 中 只会包含必要的 文件
282
- if (mainBlocklet && !['screenshots', 'public', 'logo.png', '_prettierrc'].includes(file)) {
276
+ if (mainBlocklet && !['screenshots', 'public', 'logo.png', '.prettierrc','LICENSE'].includes(file)) {
283
277
  continue;
284
278
  }
285
279
  // xmark 相关的模板不添加 .husky
@@ -287,11 +281,9 @@ async function init() {
287
281
  // eslint-disable-next-line no-continue
288
282
  continue;
289
283
  }
290
- const targetPath = renameFiles[file]
291
- ? path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', renameFiles[file])
292
- : path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', file);
284
+ const targetPath = path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', file);
293
285
 
294
- copy(path.join(commonDir, file), targetPath);
286
+ fs.copySync(path.join(commonDir, file), targetPath);
295
287
  }
296
288
  })();
297
289
 
@@ -518,13 +510,11 @@ async function init() {
518
510
 
519
511
  // inside functions
520
512
  function write(file, content, templateDir, templateName) {
521
- const targetPath = renameFiles[file]
522
- ? path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', renameFiles[file])
523
- : path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', file);
513
+ const targetPath = path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', file);
524
514
  if (content) {
525
515
  fs.writeFileSync(targetPath, content);
526
516
  } else {
527
- copy(path.join(templateDir, file), targetPath);
517
+ fs.copySync(path.join(templateDir, file), targetPath);
528
518
  }
529
519
  }
530
520
  function read(file, templateName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-blocklet",
3
- "version": "0.4.71",
3
+ "version": "0.4.73",
4
4
  "exports": "./index.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:blocklet/create-blocklet.git",
@@ -70,7 +70,7 @@
70
70
  "npm-run-all": "^4.1.5",
71
71
  "prettier": "^2.7.1",
72
72
  "vite": "^3.1.7",
73
- "vite-plugin-blocklet": "^0.4.71",
73
+ "vite-plugin-blocklet": "^0.4.73",
74
74
  "vite-plugin-html": "^3.2.0",
75
75
  "vite-plugin-svgr": "^2.2.1"
76
76
  }
@@ -70,7 +70,7 @@
70
70
  "npm-run-all": "^4.1.5",
71
71
  "prettier": "^2.7.1",
72
72
  "vite": "^3.1.7",
73
- "vite-plugin-blocklet": "^0.4.71",
73
+ "vite-plugin-blocklet": "^0.4.73",
74
74
  "vite-plugin-html": "^3.2.0",
75
75
  "vite-plugin-svgr": "^2.2.1"
76
76
  }
@@ -50,7 +50,7 @@
50
50
  "lint-staged": "^12.5.0",
51
51
  "prettier": "^2.7.1",
52
52
  "vite": "^3.1.7",
53
- "vite-plugin-blocklet": "^0.4.71",
53
+ "vite-plugin-blocklet": "^0.4.73",
54
54
  "vite-plugin-html": "^3.2.0",
55
55
  "vite-plugin-svgr": "^2.2.1"
56
56
  }
@@ -32,7 +32,7 @@
32
32
  "npm-run-all": "^4.1.5",
33
33
  "prettier": "^2.7.1",
34
34
  "vite": "^3.1.7",
35
- "vite-plugin-blocklet": "^0.4.71",
35
+ "vite-plugin-blocklet": "^0.4.73",
36
36
  "vite-plugin-html": "^3.2.0",
37
37
  "vite-plugin-solid": "^2.3.9"
38
38
  },
@@ -26,7 +26,7 @@
26
26
  "lint-staged": "^12.5.0",
27
27
  "prettier": "^2.7.1",
28
28
  "vite": "^3.1.7",
29
- "vite-plugin-blocklet": "^0.4.71",
29
+ "vite-plugin-blocklet": "^0.4.73",
30
30
  "vite-plugin-html": "^3.2.0",
31
31
  "vite-plugin-solid": "^2.3.9"
32
32
  },
@@ -46,7 +46,7 @@
46
46
  "prettier": "^2.7.1",
47
47
  "svelte": "^3.50.1",
48
48
  "vite": "^3.1.7",
49
- "vite-plugin-blocklet": "^0.4.71",
49
+ "vite-plugin-blocklet": "^0.4.73",
50
50
  "vite-plugin-html": "^3.2.0"
51
51
  },
52
52
  "lint-staged": {
@@ -27,7 +27,7 @@
27
27
  "prettier": "^2.7.1",
28
28
  "svelte": "^3.50.1",
29
29
  "vite": "^3.1.7",
30
- "vite-plugin-blocklet": "^0.4.71",
30
+ "vite-plugin-blocklet": "^0.4.73",
31
31
  "vite-plugin-html": "^3.2.0"
32
32
  },
33
33
  "lint-staged": {
@@ -49,7 +49,7 @@
49
49
  "npm-run-all": "^4.1.5",
50
50
  "prettier": "^2.7.1",
51
51
  "vite": "^3.1.7",
52
- "vite-plugin-blocklet": "^0.4.71"
52
+ "vite-plugin-blocklet": "^0.4.73"
53
53
  },
54
54
  "lint-staged": {
55
55
  "*.{mjs,js,vue}": [
@@ -28,7 +28,7 @@
28
28
  "lint-staged": "^12.5.0",
29
29
  "prettier": "^2.7.1",
30
30
  "vite": "^3.1.7",
31
- "vite-plugin-blocklet": "^0.4.71",
31
+ "vite-plugin-blocklet": "^0.4.73",
32
32
  "vite-plugin-html": "^3.2.0"
33
33
  },
34
34
  "lint-staged": {
package/common/_gitignore DELETED
@@ -1,28 +0,0 @@
1
- # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
-
3
- # dependencies
4
- .pnp
5
- .pnp.js
6
- .DS_Store
7
- node_modules
8
-
9
- # testing
10
- coverage
11
-
12
- # production
13
- build
14
- dist
15
- dist-ssr
16
- .blocklet
17
-
18
- # local env files
19
- *.local
20
-
21
- # Log files
22
- logs
23
- *.log
24
- npm-debug.log*
25
- yarn-debug.log*
26
- yarn-error.log*
27
- pnpm-debug.log*
28
- lerna-debug.log*
package/common/_npmrc DELETED
@@ -1,3 +0,0 @@
1
- ## force pnpm to hoist
2
- shamefully-hoist=true
3
- strict-peer-dependencies=false