Skip to content

Instantly share code, notes, and snippets.

@bymathias
Created July 1, 2015 13:02
Show Gist options
  • Save bymathias/2774fd3b4b60da49e947 to your computer and use it in GitHub Desktop.
Save bymathias/2774fd3b4b60da49e947 to your computer and use it in GitHub Desktop.
{
"name": "boss",
"version": "0.1.0",
"description": "Boileplate super simple",
"author": "Mathias Brouilly",
"license": "MIT",
"private": true,
"engines": {
"node": "0.12.x",
"npm": "2.11.x"
},
"dependencies": {},
"devDependencies": {
"browser-sync": "^2.7.13",
"gh-pages": "^0.3.1",
"imagemin": "^3.2.0",
"myth": "^1.4.0",
"onchange": "^1.1.0",
"parallelshell": "^1.2.0",
"trash": "^1.4.1",
"uglify-js": "^2.4.23"
},
"scripts": {
"setup-app-folder": "mkdir -p ./app/{styles,scripts,images,fonts}/",
"setup-app-files": "touch ./app/styles/app.css ./app/scripts/{app.js,helper.js} && echo './app/fonts ./dest/font' > ./app/copy",
"postinstall": "npm run setup-app-folder && npm run setup-app-files",
"tree": "trash --force ./dest/{css,js,img,font}/ && mkdir -p ./dest/{css,js,js/libs,img,font}/",
"copy": "xargs -n2 < app/copy cp -rf && imagemin ./app/images ./dest/img -i -o 4 -p",
"base": "npm run tree && npm run copy",
"make-css": "myth ./app/styles/app.css ./dest/css/app.css",
"make-js": "uglifyjs ./app/scripts/helper.js ./app/scripts/app.js -o ./dest/js/app.js -b -comments all --lint",
"make": "npm run base && npm run make-css && npm run make-js",
"serve": "browser-sync start --files 'dest/**/*' --server 'dest'",
"watch-css": "onchange ./app/styles/*.css -- npm run make-css",
"watch-js": "onchange ./app/scripts/*.js -- npm run make-js",
"watch": "npm run make && parallelshell 'npm run watch-css' 'npm run watch-js' 'npm run serve'",
"build-css": "myth ./app/styles/app.css ./dest/css/app.min.css -c",
"build-js": "uglifyjs ./app/scripts/helper.js ./app/scripts/app.js -o ./dest/js/app.min.js -c -m",
"build": "npm run base && npm run build-css && npm run build-js",
"release": "npm version -m 'chore(release): v%s'",
"deploy": "gh-pages -d ./dest"
}
}
@bymathias
Copy link
Author

curl -O https://gist.githubusercontent.com/bymathias/2774fd3b4b60da49e947/raw/bd711e071f597be89f13ca2c25605c927ec25a36/package.json
npm i

npm run watch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment