Skip to content

Instantly share code, notes, and snippets.

@nilliams
Last active June 25, 2017 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilliams/54ee8fd16addf38b36877bf2c89eb64c to your computer and use it in GitHub Desktop.
Save nilliams/54ee8fd16addf38b36877bf2c89eb64c to your computer and use it in GitHub Desktop.
Minimal Quick-Start package.json for Browserify & Sass
{
"name": "project-quick-start",
"version": "1.0.0",
"description": "npm install; npm run base; npm start",
"main": "",
"scripts": {
"start": "npm-run-all --parallel js:watch css:watch",
"base": "npm-run-all base:dirs base:js base:css base:html",
"base:dirs": "mkdirp src",
"base:js": "[[ -e src/index.js ]] || echo \"document.getElementById('root').textContent = 'Hello World!'\" > src/index.js",
"base:css": "[[ -e src/main.scss ]] || echo \"body { color: hotpink }\" > src/main.scss",
"base:html": "[[ -e index.html ]] || create-html --title 'Hello World!' --body '<div id=\"root\"></div>' --css main.css --script bundle.js > index.html",
"css": "node-sass src -o .",
"css:watch": "npm run css; npm run css -- --watch",
"js": "browserify src/index.js -o bundle.js",
"js:watch": "watchify src/index.js -o bundle.js -v",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "UNLICENSED",
"devDependencies": {
"browserify": "^14.4.0",
"create-html": "^3.0.0",
"mkdirp": "^0.5.1",
"node-sass": "^4.5.3",
"npm-run-all": "^4.0.2",
"watchify": "^3.9.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment