-
Notifications
You must be signed in to change notification settings - Fork 569
Shim Javascript Code #111
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
Comments
I am not sure about this... I think a |
That is a much better idea of course. I wasn't happy with my solution either, but I think the need is there. |
Please give it a try and tell me if this works in your case. Thanks. :-) |
My only issue is that my library isn't rebuilt if the .js files change, only if the .go files are. I haven't dug into the compiler enough to know if this would be possible to fix. Otherwise, this is fantastic! Thanks for working on it. |
Hey @ajhager , please be aware that I changed the extension to |
Thanks, it works great now. You even anticipated my next issue. Excellent! |
I keep having the need to provide custom javascript with a GopherJS library. For something like AngularJS, it seems fair to ask a user to include the library manually, but with custom library code it becomes a chore.
I created a utility to get around this https://github.com/ajhager/shmi, but it adds a manual build step. I wonder if it would be helpful to provide a mechanism to bundle javascript automatically using GopherJS.
There are a few ways this could be handled, but I suggest perhaps:
The compiler could make sure any javascript files would only be bundled once, and raise an error if the files don't exist.
I am happy to work on this, but I would appreciate some feedback.
The text was updated successfully, but these errors were encountered: