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