-
Notifications
You must be signed in to change notification settings - Fork 5
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
Loading external resources #125
Labels
Comments
lptr
changed the title
Modules should be able to load external resources
Loading external resources
Sep 10, 2014
The implementation of this function would be different for Require and Node JS packaging. |
In single file applications we could throw a runtime error, or we could assume that the application will be run as Node, and just use Node's |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now if a module wants to load external resources, it cannot reliable do that. There is a hack that you can write:
But doing so makes you implicitly rely on your module being packaged as AMD (i.e. that an async
require()
function is available in the context). Once you package the module in a Node JS app, it will break. There is already a plan to fix this, but we cannot do that until modules have a better way to access external resources: #122.Proposal: add a function to the
Spaghetti
class (neeSpaghettiConfiguration
, see #126), so modules can load resources like that. It should look something like this:The text was updated successfully, but these errors were encountered: