ccc-devtools/scripts/setup.js
2022-08-02 21:12:45 +08:00

15 lines
481 B
JavaScript

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);
});