zambezi / ez-build

Zambezi build tool
MIT License
2 stars 1 forks source link

Set NODE_ENV if unset at runtime – or – if set, use it #42

Closed mstade closed 8 years ago

mstade commented 8 years ago

Description

When the --production flag is set, we ensure ez-build also sets NODE_ENV internally, such that build setups that use process.env.NODE_ENV substitutions work as expected. However, if NODE_ENV is already set, we leave it alone. Additionally, if NODE_ENV is set to production prior to invoking ez-build, it too will enable production mode. This means it's possible to enable production mode in the following ways:

More color on this topic is found in #38, which is fixed by this PR.

How Was This Tested?

Both unit tests and CLI tests were added, to test for options parsing and changes to build execution.

Types of changes

codecov-io commented 8 years ago

Current coverage is 86.89% (diff: 100%)

Merging #42 into master will increase coverage by 0.19%

@@             master        #42   diff @@
==========================================
  Files            15         15          
  Lines           263        267     +4   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            228        232     +4   
  Misses           35         35          
  Partials          0          0          

Powered by Codecov. Last update 79239c5...1793ddd