2019-08-06 21:44:55 +08:00

15 lines
341 B
JavaScript

var ghpages = require('gh-pages');
const shell = require('shelljs');
const chalk = require('chalk');
// 发布
ghpages.publish('./dist', {
branch: 'gh-pages',
}, (err) => {
if(err) {
console.log(chalk.red(err));
} else {
shell.rm('-rf', './dist');
console.log(chalk.green('demo同步完成!'));
}
});