@yorha2b-lab/autodev 1.0.3 → 1.0.5
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/bin/autodev.js +0 -12
- package/package.json +1 -1
- package/src/utils/utils.js +1 -1
package/bin/autodev.js
CHANGED
|
@@ -26,18 +26,6 @@ program.version('1.0.0').description('AI驱动的前端CRUD代码生成器')
|
|
|
26
26
|
|
|
27
27
|
program.option('-t, --template <type>', '指定前端框架模板', 'react')
|
|
28
28
|
|
|
29
|
-
program
|
|
30
|
-
.command('init')
|
|
31
|
-
.description('在当前目录初始化 .env 和 config.js 配置文件')
|
|
32
|
-
.action(() => {
|
|
33
|
-
const tplConfig = path.resolve(__dirname, '../config.js')
|
|
34
|
-
const tplEnv = path.resolve(__dirname, '../.env.example')
|
|
35
|
-
fs.copyFileSync(tplConfig, path.join(process.cwd(), 'config.js'))
|
|
36
|
-
fs.copyFileSync(tplEnv, path.join(process.cwd(), '.env'))
|
|
37
|
-
console.log('✅ 已生成 config.js')
|
|
38
|
-
console.log('✅ 已生成 .env')
|
|
39
|
-
})
|
|
40
|
-
|
|
41
29
|
program
|
|
42
30
|
.command('watch:page')
|
|
43
31
|
.description('监听截图,自动生成完整的增删改查页面')
|
package/package.json
CHANGED
package/src/utils/utils.js
CHANGED
|
@@ -75,4 +75,4 @@ const copyComponents = (options, componentsDir = 'src/components') => {
|
|
|
75
75
|
fs.readdirSync(componentsDirectory).forEach(file => fs.copyFileSync(path.join(componentsDirectory, file), path.join(targetDir, file)))
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
module.exports = { getConfig, copyHooks, cleanCode, copyComponents, getExistingMenus, generateSmartImports }
|
|
78
|
+
module.exports = { getConfig, copyHooks, cleanCode, copyComponents, getExistingMenus, generateSmartImports }
|