Reputation: 145
I saw this in flux chat examplethe.
browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > js/bundle.min.js
Why is browserify . -t [envify --NODE_ENV production]
used here?
.
used?[envify --NODE_ENV production]
used after -t
?Upvotes: 0
Views: 1217
Reputation: 3149
things after -t
are transformers. They will be called before the bundeling process. They can be use to transform your code into pure javascript.
For example: reactify can transform JSX to plain javascript and babelify gives you the opporunity to use es6 features like arrow functions and convert them to plain javascript (es5) before starting the bundeling process.
Here you can show what Envify is for. Short: It can declare node evironment variables as plain strings.
Upvotes: 1