Skip to content

Scope *.inc.js files to prevent global pollution #592

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

Closed
tj opened this issue Feb 20, 2017 · 2 comments
Closed

Scope *.inc.js files to prevent global pollution #592

tj opened this issue Feb 20, 2017 · 2 comments

Comments

@tj
Copy link

tj commented Feb 20, 2017

Just a thought, but it would be cool to expose the "global"s of include files wrapped in a closure so you don't have to chuck everything on window for bindings to work.

In .go files I guess this would maybe look something like js.Binding.Call("hello") scoped to the closure instead of polluting global.

@tj tj changed the title Scope *.inc.js files Scope *.inc.js files to prevent global pollution Feb 20, 2017
@tj
Copy link
Author

tj commented Feb 22, 2017

Hmm realizing now that the js include files are not a fantastic solution for a larger number of dependencies, since you have to produce stand-alone builds of NPM modules it ends up producing a lot of duplicate dependencies.

@tj
Copy link
Author

tj commented Feb 23, 2017

#524 is similar, going to close this

@tj tj closed this as completed Feb 23, 2017
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

No branches or pull requests

1 participant