Skip to content

Instantly share code, notes, and snippets.

@sethlopezme
Created July 2, 2016 21:18
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 sethlopezme/24ae4ad2fd18afe9c5bbcf1b84ded27c to your computer and use it in GitHub Desktop.
Save sethlopezme/24ae4ad2fd18afe9c5bbcf1b84ded27c to your computer and use it in GitHub Desktop.
{
"dependencies": {
"jshint": "latest",
"uglifyjs": "latest",
"watch": "latest"
},
"config": {
"github_url": "https://api.github.com/repos/MarkBiesheuvel/markbiesheuvel.nl/commits?page=1&per_page=10",
"maps_url": "https://maps.googleapis.com/maps/api/staticmap?size=640x200&zoom=7&markers=color%3Ablue%7Clabel%3AH%7C51.469941%2C5.472258&markers=color%3Ayellow%7Clabel%3AW%7C51.574344%2C5.13781",
},
"scripts": {
"clean:dist": "rm -rf dist",
"clean:tmp": "rm -rf tmp",
"clean": "npm run clean:dist && npm run clean:tmp",
"jshint:dist": "src/js/*.js'",
"jshint": "npm run jshint:dist",
"copy:dist": "cp src/!{js,css,index.html.tpl} dist/",
"copy": "npm run copy:dist",
"uglify:dist": "uglify src/js/**/*.js > dist/js/script.min.js",
"uglify": "npm run uglify:dist",
"less:dist": "lessc -x -sm=on src/css/style.less > dist/css/style.min.css",
"less": "npm run less:dist",
"curl:github": "curl -H 'Accept:application/vnd.github.v3+json' $npm_package_config_github_url > tmp/github.json",
"curl:maps": "curl $npm_package_config_maps_url > dist/img/maps.png",
"htmlmin:dist": "htmlmin -cs dist/index.html tmp/index.html",
"template": "echo Not sure what this does, so don't know, sorry!",
"build:html": "npm run curl:github && npm run template && npm run htmlmin",
"build:js": "npm run jshint && npm run uglify",
"build:css": "npm run less",
"build": "npm run clean && npm run build:html && npm run build:js && npm run build:css",
"watch": "watch 'npm run build' ."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment