deeke-script-app 1.2.1 → 1.2.3

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.
Files changed (3) hide show
  1. package/init +2 -10
  2. package/init.lock +0 -0
  3. package/package.json +1 -4
package/init CHANGED
@@ -1,4 +1,3 @@
1
- const { default: inquirer } = require('inquirer');
2
1
  const fs = require('fs');
3
2
  const path = require('path');
4
3
 
@@ -6,7 +5,7 @@ function generateFiles(answers) {
6
5
  const projectPath = path.dirname(path.dirname(__dirname)); // 输出:/Users/username/project
7
6
  const files = fs.readdirSync(projectPath);
8
7
 
9
- if (files.length > 3 || !files.includes('package.json') || !files.includes('package-lock.json') || !files.includes('node_modules')) {
8
+ if (files.includes('init.lock')) {
10
9
  return ;
11
10
  }
12
11
 
@@ -27,14 +26,7 @@ function generateFiles(answers) {
27
26
  fs.cpSync(srcPath, destPath, { recursive: true });
28
27
  }
29
28
  });
29
+
30
30
  }
31
31
 
32
32
  generateFiles({});
33
-
34
- /**
35
- inquirer.prompt([
36
- { name: 'name', message: '请输入项目名称:' },
37
- { name: 'host', message: '请输入项目域名:' }
38
-
39
- ]).then(answers => generateFiles(answers));
40
- */
package/init.lock ADDED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deeke-script-app",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "DeekeScript应用",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -37,8 +37,5 @@
37
37
  "cpx": "^1.5.0",
38
38
  "inquirer": "^12.4.2",
39
39
  "ts-node": "^10.9.2"
40
- },
41
- "bin": {
42
- "init": "node ./init.js"
43
40
  }
44
41
  }