Last active
December 28, 2017 13:57
-
-
Save enijar/0d9632c80dc8439c9163 to your computer and use it in GitHub Desktop.
React + Babelify + Watchify with Node Scripts
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
{ | |
"private": true, | |
"name": "ReactValidation", | |
"version": "1.0.0", | |
"description": "Validates form elements.", | |
"repository": { | |
"type": "git", | |
"url": "[email protected]:Enijar/reactvalidation.git" | |
}, | |
"dependencies": { | |
"react": "^0.14.3", | |
"react-dom": "^0.14.3" | |
}, | |
"devDependencies": { | |
"babelify": "^6.1.3", | |
"browserify": "^12.0.1", | |
"browserify-incremental": "^3.0.1", | |
"nodemon": "^1.3.8" | |
}, | |
"browserify": { | |
"transform": [ | |
"babelify" | |
] | |
}, | |
"scripts": { | |
"build": "npm run compile:js && npm run compile:sass", | |
"watch": "npm run watch:js & npm run watch:sass", | |
"notify:js": "osascript -e 'display notification \"JavaScript compiled to public/assets/js/bundle.js\" with title \"JavaScript Compiled\"'", | |
"notify:sass": "osascript -e 'display notification \"CSS compiled to public/assets/js/app.js\" with title \"CSS Compiled\"'", | |
"compile:js": "browserifyinc -e resources/assets/js/app.js -o public/assets/js/bundle.js --cachefile .browserify-cache.json && npm run notify:js", | |
"compile:sass": "sass resources/assets/sass/app.scss:public/assets/css/app.css && npm run notify:sass", | |
"watch:js": "nodemon --watch 'resources/assets/js' --exec 'npm run compile:js'", | |
"watch:sass": "nodemon --watch 'resources/assets/sass' -e scss --exec 'npm run compile:sass'" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run with
npm run watch
.Requires
ruby-sass
to work andnode.js
.