Skip to content

Instantly share code, notes, and snippets.

@yannduran
Created April 6, 2017 01:54
Show Gist options
  • Save yannduran/28be031a30966f6e4a115452a5410510 to your computer and use it in GitHub Desktop.
Save yannduran/28be031a30966f6e4a115452a5410510 to your computer and use it in GitHub Desktop.
//cleans cache file (db.json) and generated files (public_dir)
gulp.task('site:clean', (cb) => {
const command = 'clean';
const args = {};
return hexo.init().then(() => {
return hexo.call(command, args);
}).then(() => {
return cb()
}).catch((err) => {
hexo.error(err);
return cb(err);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment