summaryrefslogtreecommitdiffstats
path: root/package.json
diff options
context:
space:
mode:
authorMichael Davis <michael.s.davis@ibm.com>2017-02-14 13:44:31 -0600
committerPatrick Williams <patrick@stwcx.xyz>2017-07-12 15:49:29 -0500
commit76720ce74bbc15ba94e809e2acc5acaf4a126b9c (patch)
tree3a7305ee576f514a870f44a937bcc25400ceb610 /package.json
parent4d0d37efe124c3c5fca3c8fe7605d153790b844f (diff)
downloadphosphor-webui-76720ce74bbc15ba94e809e2acc5acaf4a126b9c.tar.gz
phosphor-webui-76720ce74bbc15ba94e809e2acc5acaf4a126b9c.zip
Add npm build directives
Change-Id: I8e4b5e60d966934dfc30fd7429a9935d890ec976 Signed-off-by: Michael Davis <michael.s.davis@ibm.com>
Diffstat (limited to 'package.json')
-rw-r--r--package.json43
1 files changed, 43 insertions, 0 deletions
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..aa2ba32
--- /dev/null
+++ b/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "openbmc-wires",
+ "version": "0.0.1",
+ "scripts": {
+ "clean": "rimraf dist/*",
+ "prebuild": "npm run clean -s",
+ "scss": "node-sass --output-style compressed -o dist/css src/scss/",
+ "autoprefixer": "postcss -u autoprefixer -r dist/css/*",
+ "uglify": "mkdir -p dist/js && uglifyjs src/js/*.js -m -o dist/js/app.min.js && mkdir -p dist/js/vendor && uglifyjs node_modules/zepto/dist/zepto.js -m -o dist/js/vendor/vendor.min.js",
+ "imagemin": "imagemin src/img/* --out-dir=dist/img/",
+ "serve": "browser-sync start --server 'dist' --files 'dist/css/*.css, dist/js/*.js, dist/*.html'",
+ "build:css": "npm run scss && npm run autoprefixer",
+ "build:js": "npm run uglify",
+ "build:html": "html-minifier --input-dir ./src/ --output-dir ./dist --collapse-whitespace --remove-comments --file-ext html ",
+ "build:images": "npm run imagemin ",
+ "build:all": "npm run prebuild && npm run build:css && npm run build:js && npm run build:html && npm run build:images",
+ "watch:css": "onchange 'src/scss/' -- npm run build:css",
+ "watch:js": "onchange 'src/js/*.js' -- npm run build:js",
+ "watch:html": "onchange 'src/*.html' -- npm run build:html",
+ "watch:images": "onchange 'src/img/*.*' -- npm run build:images",
+ "watch:all": "parallelshell 'npm run serve' 'npm run watch:css' 'npm run watch:js' 'npm run watch:html'",
+ "postinstall": "npm run build:all && npm run watch:all",
+ "start": "npm run build:all && npm run watch:all",
+ "gzip": "tar -czf openBMC.tar.gz dist"
+ },
+ "devDependencies": {
+ "autoprefixer": "^6.6.1",
+ "browser-sync": "^2.18.6",
+ "html-minifier": "^3.3.0",
+ "imagemin-cli": "^3.0.0",
+ "milligram": "^1.2.4",
+ "mustache": "^2.3.0",
+ "node-sass": "^4.3.0",
+ "onchange": "^3.2.1",
+ "parallelshell": "^2.0.0",
+ "postcss-cli": "^2.6.0",
+ "uglify-js": "^2.7.5",
+ "zepto": "^1.2.0"
+ },
+ "dependencies": {
+ "imagemin": "^5.2.2"
+ }
+}
OpenPOWER on IntegriCloud