-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added NODE_ENV to configure debug mode #80
base: master
Are you sure you want to change the base?
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 |
@@ -18,7 +18,7 @@ | |||
* | |||
* @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to throw if users aren't using webpack/browserify.
@@ -5,7 +5,7 @@ | |||
* | |||
* @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to throw if users aren't using webpack/browserify
@@ -64,7 +64,7 @@ return /******/ (function(modules) { // webpackBootstrap | |||
* | |||
* @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this different to the change in /fastdom.js
?
Make debug flag editable by setting NODE_ENV to production.