Skip to content

Instantly share code, notes, and snippets.

@iampeterbanjo
Last active January 4, 2017 06:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iampeterbanjo/170d8ea332797c2a6ea8 to your computer and use it in GitHub Desktop.
Save iampeterbanjo/170d8ea332797c2a6ea8 to your computer and use it in GitHub Desktop.
NPM package for working with gohugo.io
{
"name": "hello.hugo",
"version": "1.0.0",
"description": "Test gohugo.io project",
"main": "browserSync.js",
"dependencies": {},
"devDependencies": {},
"config": {
"port": "4646",
"theme": "hyde"
},
"scripts": {
"install": "npm install -g chokidar-cli parallelshell browser-sync less",
"hugo": "hugo server --theme=$npm_package_config_theme --buildDrafts -w -p $npm_package_config_port",
"clean": "rm -rf node_modules",
"dev": "parallelshell 'npm run watch' 'npm run browsers'",
"browsers": "browser-sync --files 'public/**/*' start --server public",
"build": "parallelshell 'npm run build:hugo' 'npm run build:less' 'browser-sync'",
"build:hugo": "hugo --theme=$npm_package_config_theme --buildDrafts",
"build:less": "lessc ./themes/$npm_package_config_theme/static/css/styles.less > ./themes/$npm_package_config_theme/static/css/styles.css",
"watch": "parallelshell 'npm run watch:less' 'npm run watch:files'",
"watch:less": "chokidar '**/*.less' -c 'npm run build:less'",
"watch:files": "chokidar '**/*.css' '**/*.html' '**/*.toml' '**/*.md' -i 'public/**/*' -c 'npm run build:hugo'"
},
"keywords": [
"golang",
"nodejs"
],
"author": "Peter Banjo",
"license": "ISC"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment