ccc-devtools/scripts/setup.js

15 lines
481 B
JavaScript
Raw Permalink Normal View History

2022-08-02 13:12:45 +00:00
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);
});