Created
January 14, 2016 21:17
-
-
Save donkeysharp/8e0bd189e3ea1d8b14b2 to your computer and use it in GitHub Desktop.
package.json to use npm as a build tool for react applications using sass and ES2015
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": "my-npm-boilerplate", | |
"version": "1.0.0", | |
"description": "Example structure for using npm as a build tool", | |
"main": "index.js", | |
"scripts": { | |
"clean": "rm -rf dist; mkdir -p dist/css dist/js", | |
"build": "parallelshell 'npm run clean' 'npm run build:js' 'npm run build:css'", | |
"build:js": "browserify js/index.js -t [ babelify --presets [es2015 react] ] | uglifyjs -mc -o dist/js/main.min.js", | |
"build:css": "sass scss/main.scss:dist/css/main.min.css --style compressed --sourcemap=none", | |
"watch:js": "watchify js/index.js -o dist/js/main.js -t [ babelify --presets [es2015 react] ] -v", | |
"watch:css": "sass --watch scss/main.scss:dist/css/main.css --sourcemap=none", | |
"watch": "parallelshell 'npm run clean' 'npm run watch:css' 'npm run watch:js'" | |
}, | |
"author": "@donkeysharp", | |
"license": "MIT", | |
"devDependencies": { | |
"babel-preset-es2015": "^6.3.13", | |
"babel-preset-react": "^6.3.13", | |
"babelify": "^7.2.0", | |
"browserify": "^13.0.0", | |
"parallelshell": "^2.0.0", | |
"uglify-js": "^2.6.1", | |
"watchify": "^3.7.0" | |
}, | |
"dependencies": { | |
"react": "^0.14.6", | |
"react-dom": "^0.14.6" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment