Added NODE_ENV to configure debug mode#80
Added NODE_ENV to configure debug mode#80wardpeet wants to merge 2 commits intowilsonpage:masterfrom
Conversation
|
This would be handy when you use it with webpack, you can trigger debug mode |
|
Good patch to make the production bundle as small as possible. I wonder why the compiled libs are checked into the repo though. Shouldn't they just be deployed to npm? |
|
no idea but repo has this so I thought i would ust do the same |
|
@wilsonpage why are the compiled versions checked in? |
|
@pke yes the compiled |
| * @return {Function} | ||
| */ | ||
| var debug = 0 ? console.log.bind(console, '[fastdom]') : function() {}; | ||
| var debug = process.env.NODE_ENV !== 'production' ? console.log.bind(console, '[fastdom]') : function() {}; |
There was a problem hiding this comment.
This is going to throw if users aren't using webpack/browserify.
| * @return {Function} | ||
| */ | ||
| var debug = 0 ? console.log.bind(console, '[fastdom-sandbox]') : function() {}; | ||
| var debug = process.env.NODE_ENV !== 'production' ? console.log.bind(console, '[fastdom-sandbox]') : function() {}; |
There was a problem hiding this comment.
This is going to throw if users aren't using webpack/browserify
| * @return {Function} | ||
| */ | ||
| var debug = 0 ? console.log.bind(console, '[fastdom-strict]') : function() {}; | ||
| var debug = false ? console.log.bind(console, '[fastdom-strict]') : function() {}; |
There was a problem hiding this comment.
Why is this different to the change in /fastdom.js?
Make debug flag editable by setting NODE_ENV to production.