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

Consider adding module meta-data to modules entry #4

Open
dominicbarnes opened this issue Jun 17, 2014 · 4 comments
Open

Consider adding module meta-data to modules entry #4

dominicbarnes opened this issue Jun 17, 2014 · 4 comments

Comments

@dominicbarnes
Copy link

I just came across a case where it would be extremely helpful to have meta-data about a package available to my script. For example, when using clipboard-dom, you need to give a path to the swf file. However, I currently have to manually specify a path like: /public/component/clipboard-dom/v0.0.5/ZeroClipboard.swf

Since CSS URLs get rewritten, it seems reasonable to allow a JS file to pick up an asset URL like this. Could each registered component include something like a "path" (or at least name/version?)

@jonathanong
Copy link
Contributor

Not sure how to do this without making it a clusterfuck. Haha. It should be added to the component.json somehow and let the builder handle it

@dominicbarnes
Copy link
Author

Hmm, maybe the builder can automatically include the source component.json as well? (or would that be weird too?)

@jonathanong
Copy link
Contributor

I would say the easiest thing to do is have require.assets = {} lookup. The builder should map the asset name somehow to a URL you could use Ajax on. Including component.json files would be way too noisy

@dominicbarnes
Copy link
Author

Ok, I think that's reasonable. I'll start working on this

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

2 participants