j0hnsmith / django-pipeline-browserify

MIT License
37 stars 18 forks source link

Add PIPELINE_BROWSERIFY_VARS setting. #1

Closed kmeht closed 9 years ago

kmeht commented 10 years ago

This adds a PIPELINE_BROWSERIFY_VARS setting to optionally specify environment variables before the browserify command is executed. For example, I'd like to specify NODE_ENV=production, which (in my use-case) will allow me to strip out dev-only code during the compression phase.

kmeht commented 10 years ago

@j0hnsmith, does this look okay?

j0hnsmith commented 10 years ago

Just seen this, I'll check it out tonight

kmeht commented 10 years ago

ping @j0hnsmith

j0hnsmith commented 10 years ago

Is setting env vars before running node commands a common thing to do (I don't really use node that much)?

kmeht commented 10 years ago

Not sure how common it is, but definitely useful. I could just set the PIPELINE_BROWSERIFY_BINARY based on DEBUG to achieve the same result, if this behavior is not something you want in the main repo :)