cupper-hugo-theme/lib/build.js

12 lines
376 B
JavaScript
Raw Normal View History

2017-09-13 11:14:15 +02:00
var exec = require('child_process').exec;
var path = require('path');
exec('rm -rfv ' + path.join(path.resolve('.'), 'docs', '*') + ' && hugo && sw-precache --root=docs && git add -A', function(error, stdout, stderr) {
console.log('Building...');
if (error !== null) {
console.error('Error building site.');
return;
}
console.log('Site built at /docs.');
});