Skip to content
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

Refactor main Dust module's global context #582

Merged
merged 3 commits into from
Mar 24, 2015

Conversation

sethkinast
Copy link
Contributor

Depends on #579, don't pull until that one is.

Uses the same UMD pattern as parser and compiler now, instead of a slightly different one. root should only be used to refer to the browser window, not Node's global, so now we use console directly instead of root.console.

Fixed up tests to ensure that we call dust.log even though debugLevel is turned off to avoid spam, to make sure that we test the code path.

Fixes #500 by removing the IIFE in favor of this.
Fixes #524 by allowing DEBUG=dust to be set on the command line to turn on debugging.


})((function(){return this;})());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to fix this so many times...This was for console.log according to blame (99b5ced).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it should be 100% fixed now. I explain above why we were doing this-- it made things work by getting a windowlike, but we just shouldn't have used root.console to begin with because root should only be for the browser.

@sethkinast sethkinast force-pushed the thisthisthis branch 2 times, most recently from eda360a to 93280c9 Compare March 24, 2015 22:34
Seth Kinast added 3 commits March 24, 2015 15:47
Uses the same UMD pattern as parser and compiler now, instead of a slightly different one. `root` should only be used to refer to the browser window, not Node's `global`, so now we use `console` directly instead of `root.console`.

Fixed up tests to ensure that we call dust.log even though debugLevel is turned off to avoid spam, to make sure that we test the code path.

Fixes linkedin#500 by removing the IIFE in favor of `this`.
Fixes linkedin#524 by allowing DEBUG=dust to be set on the command line to turn on debugging.
prashn64 added a commit that referenced this pull request Mar 24, 2015
Refactor main Dust module's global context
@prashn64 prashn64 merged commit d0857ac into linkedin:master Mar 24, 2015
@sethkinast sethkinast deleted the thisthisthis branch March 25, 2015 00:14
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.

Default dust.debugLevel should not be NONE Problems with .Net minification system
3 participants