Skip to content

Instantly share code, notes, and snippets.

@ksykulev
Created August 17, 2016 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ksykulev/72c4aad648bf1d7f151e460b09896be1 to your computer and use it in GitHub Desktop.
Save ksykulev/72c4aad648bf1d7f151e460b09896be1 to your computer and use it in GitHub Desktop.
browserify redux
# npm post install script to browserify redux instead of using webpack
# https://github.com/reactjs/redux/
# setup dependencies
$ npm install browserify --save-dev
$ npm install browserify-incremental --save-dev
$ npm install babelify --save-dev
$ npm install babel-preset-stage-2 --save-dev
$ npm install babel-preset-es2015 --save-dev
$ npm install babel-preset-react --save-dev
# packge.json
"scripts": {
"postinstall": "./node_modules/browserify/bin/cmd.js ./node_modules/redux/src/index.js -t [ babelify --presets [ stage-2 es2015 react ] ] -s redux --detect-globals -o ./vendor/assets/javascripts/redux.js"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment