deeke-script-app 1.2.2 → 1.2.4

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 +3 -11
  2. package/init.lock +0 -0
  3. package/package.json +1 -1
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,12 +5,12 @@ 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
 
13
12
  const entries = fs.readdirSync(__dirname, { withFileTypes: true });
14
- const excludeFiles = ['node_modules', 'init', 'test.js']; // 需排除的文件名列表
13
+ const excludeFiles = ['node_modules']; // 需排除的文件名列表
15
14
 
16
15
  const filteredEntries = entries.filter(entry =>
17
16
  !excludeFiles.includes(entry.name)
@@ -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.2",
3
+ "version": "1.2.4",
4
4
  "description": "DeekeScript应用",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {