Last active
June 9, 2016 12:41
-
-
Save roryashfordbentley/e734a1cfcde7ca1ed71345bace0297dc to your computer and use it in GitHub Desktop.
Package.json example with some set variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "FlexbonesBuild", | |
"version": "5.0.0", | |
"description": "Watch sass,js and deploy", | |
"author": "Rory Ashford <rory@roikles.com>", | |
"config": { | |
"theme": "wp-content/themes/flexbones", | |
"sass":"wp-content/themes/flexbones/assets/sass/style.scss", | |
"sassfolder":"wp-content/themes/flexbones/assets/sass", | |
"css":"wp-content/themes/flexbones/style.css", | |
"scripts": "wp-content/themes/flexbones/assets/js/scripts.js", | |
"scriptsmin": "wp-content/themes/flexbones/scripts.min.js", | |
"scriptsfolder": "wp-content/themes/flexbones/assets/js", | |
"watch": "wp-content/themes/flexbones/", | |
"watchproxy": "localhost/barebones" | |
}, | |
"scripts": { | |
"sass:css": "node-sass $npm_package_config_sass $npm_package_config_css --output-style expanded", | |
"sass:postcss": "postcss --use autoprefixer -o $npm_package_config_css $npm_package_config_css", | |
"sass:cssnano": "cssnano $npm_package_config_css $npm_package_config_css --no-autoprefixer --no-convertValues", | |
"sass": "npm run -s sass:css && npm run -s sass:postcss", | |
"js:browserify": "browserify $npm_package_config_scripts -o $npm_package_config_scriptsmin", | |
"js:uglify": "uglifyjs $npm_package_config_scriptsmin -o $npm_package_config_scriptsmin", | |
"js": "npm run -s js:browserify && npm run -s js:uglify", | |
"watch:sass": "fsmonitor -d $npm_package_config_sassfolder -q '+*.scss' npm run -s sass", | |
"watch:js": "fsmonitor -d $npm_package_config_scriptsfolder -q '+*.js' npm run -s js", | |
"browsersync": "browser-sync start --files $npm_package_config_theme --files '!.git/*' --no-open --proxy $npm_package_config_watchproxy", | |
"watch": "npm run -s browsersync & npm run -s watch:sass & npm run -s watch:js", | |
"deploy": "sh $(pwd)/deploy.sh", | |
"parker": "parker $npm_package_config_css" | |
}, | |
"devDependencies": { | |
"browserify": "^12.0.1", | |
"browserify-shim": "^3.8.12", | |
"cssnano": "^3.4.0", | |
"cssnano-cli": "^1.0.3", | |
"fsmonitor": "^0.2.4", | |
"node-sass": "^3.4.2", | |
"postcss-cli": "^2.3.2", | |
"uglify-js": "^2.6.1", | |
"uncss": "^0.13.0" | |
}, | |
"browserify": { | |
"transform": [ | |
"browserify-shim" | |
] | |
}, | |
"browserify-shim": { | |
"jquery": "global:$" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment