Skip to content

Added NODE_ENV to configure debug mode - #80

Open
wardpeet wants to merge 2 commits into
wilsonpage:masterfrom
wardpeet:debugmode
Open

Added NODE_ENV to configure debug mode#80
wardpeet wants to merge 2 commits into
wilsonpage:masterfrom
wardpeet:debugmode

Conversation

@wardpeet

@wardpeet wardpeet commented May 2, 2016

Copy link
Copy Markdown

Make debug flag editable by setting NODE_ENV to production.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 98.4% when pulling b12898c on wardpeet:debugmode into bbdc191 on wilsonpage:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 98.4% when pulling 640d02e on wardpeet:debugmode into bbdc191 on wilsonpage:master.

@wardpeet

Copy link
Copy Markdown
Author

This would be handy when you use it with webpack, you can trigger debug mode

@pke

pke commented Nov 29, 2017

Copy link
Copy Markdown

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?

@wardpeet

Copy link
Copy Markdown
Author

no idea but repo has this so I thought i would ust do the same

@pke

pke commented Nov 29, 2017

Copy link
Copy Markdown

@wilsonpage why are the compiled versions checked in?
@wardpeet maybe you can rebase and @wilsonpage can merge this then?

@wilsonpage

Copy link
Copy Markdown
Owner

@pke yes the compiled /fastdom-strict.js is checked in, just so consumers have the choice to load via <script> if need be.

Comment thread fastdom.js
* @return {Function}
*/
var debug = 0 ? console.log.bind(console, '[fastdom]') : function() {};
var debug = process.env.NODE_ENV !== 'production' ? console.log.bind(console, '[fastdom]') : function() {};

Copy link
Copy Markdown
Owner

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.

* @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() {};

Copy link
Copy Markdown
Owner

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

Comment thread fastdom-strict.js
* @return {Function}
*/
var debug = 0 ? console.log.bind(console, '[fastdom-strict]') : function() {};
var debug = false ? console.log.bind(console, '[fastdom-strict]') : function() {};

Copy link
Copy Markdown
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants