geddesign/wrap.js — Issue #3: Add path option
Author: aberman
Created: 2012-02-06 18:19:18+00:00
State: open

It would be cool if we could get a path option within wrapJS. For example, if I have a library at lib/myLibrary.js, I have to reference it in each file as wrap!lib/myLIbrary instead of wrap!myLibrary. To fix this I added 'lib/myLibrary' to the main paths in the config object, but now I have two references to the same library one with myLibrary and one with wrap!myLIbrary. Here's what I mean:

require.config({
wrapJS: {
'myLIbrary': { deps...}
},
paths: {
myLibrary: 'lib/myLibrary'
}
});

It would be better if we could have:

require.config({
wrapJS: {
'myLIbrary': {
path: 'lib/myLibrary'
}
},
});