Skip to content

Instantly share code, notes, and snippets.

@corysimmons
Last active February 2, 2016 09:35
Show Gist options
  • Save corysimmons/4783b15d7dac0899f261 to your computer and use it in GitHub Desktop.
Save corysimmons/4783b15d7dac0899f261 to your computer and use it in GitHub Desktop.
// touch package.json and put {} in it and save
// npm install --save-dev npm-run-all browser-sync stylus
// now write some sweet npm scripts (be sure to check out https://github.com/mysticatea/npm-run-all as it's awesome)
{
"scripts": {
"start": "npm-run-all --parallel server:* styles:*",
"server:browser-sync": "browser-sync start --no-notify --no-open --server --files='**/*.html, **/*.css, **/*.js'",
"styles:stylus": "stylus -w css/style.styl"
},
"devDependencies": {
"browser-sync": "^2.11.1",
"npm-run-all": "^1.5.1",
"stylus": "^0.53.0"
}
}
// run npm start
// enjoy and save this gist
// next project, copy this gist to a package.json and run npm install; npm start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment