Binary wrapper for Hugo
npm install --save-dev hugo-bin
const execFile = require('child_process').execFile;
const hugo = require('hugo-bin');
execFile(hugo, ['version'], (err, stdout) => {
console.log(stdout);
});
$(npm bin)/hugo --help
npm run create -- 'post/my-new-post' # see below 'npm-run-script'
{
"scripts": {
"build": "hugo",
"create": "hugo new",
"serve": "hugo server -ws"
}
}
See the Hugo Documentation for more information.
See the package.json commit history.
MIT © Shun Sato