Skip to content

Instantly share code, notes, and snippets.

@pirey
Created July 25, 2016 07:02
Show Gist options
  • Save pirey/f077fa46350b65f554e8019e3256e7ee to your computer and use it in GitHub Desktop.
Save pirey/f077fa46350b65f554e8019e3256e7ee to your computer and use it in GitHub Desktop.
ionic project with npm script as build tool
{
"name": "generator-ionic-npm",
"version": "1.1.1",
"description": "Ionic app generator for yeoman using npm scripts as build tool",
"scripts": {
"scss": "node-sass --output-style compressed -o www/css src/scss",
"lint": "jshint src",
"concat": "node npm_scripts/concat.js",
"concat-vendor": "node npm_scripts/concat.vendor.js",
"uglify": "uglifyjs www/js/app.bundle.js -c -m -o www/js/app.bundle.min.js",
"build:css": "mkdir -p www/css && npm run scss",
"build:js": "mkdir -p www/js && npm run lint && npm run concat && npm run uglify",
"build": "npm run build:css && npm run build:js",
"watch:css": "onchange 'src/scss' -- npm run build:css",
"watch:js": "onchange 'src/js' -- npm run build:js",
"watch": "npm run build && npm-run-all -p serve watch:css watch:js",
"test": "echo 'TODO: add testing framework integration'",
"clean": "rm -rf www/{css,js}",
"serve": "ionic serve"
},
"devDependencies": {
"bower": "^1.3.3",
"browser-sync": "^2.12.8",
"concatenate-files": "^0.1.1",
"jshint": "^2.9.2",
"node-sass": "^3.7.0",
"npm-run-all": "^2.1.1",
"onchange": "^2.4.0",
"shelljs": "^0.3.0",
"uglify-js": "^2.6.2"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment