mirror of
https://github.com/potato47/ccc-devtools.git
synced 2024-12-26 19:59:14 +00:00
15 lines
481 B
JavaScript
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);
|
||
|
});
|