添加开关

This commit is contained in:
nextfu
2022-08-02 21:12:45 +08:00
parent 6aeca4583e
commit 90baadd0aa
12 changed files with 168 additions and 121 deletions

15
scripts/setup.js Normal file
View File

@@ -0,0 +1,15 @@
const fse = require('fs-extra');
const path = require('path');
const localTemplatePath = path.join(__dirname, '../release/');
const projectTemplatePath = '/Users/next/projects/cocos/example352/';
if (!fse.existsSync(projectTemplatePath)) {
console.error('project path not exist');
return;
}
fse.copy(localTemplatePath, projectTemplatePath).then(() => {
console.log('更新预览模板成功');
}).catch(err => {
console.error('更新预览模板失败', err);
});