Last active
December 21, 2015 13:09
-
-
Save unscriptable/6310612 to your computer and use it in GitHub Desktop.
possible way to specify legacy exports and dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paths: { | |
curl: '../src/curl', | |
// you can use a path | |
test1: { | |
location: 'stuff/plain_old.js', | |
config: { | |
loader: 'curl/loader/legacy', | |
exports: 'testDomain.foo.bar' // required! | |
} | |
} | |
}, | |
packages: [ | |
// or a package | |
{ | |
name: 'test2', | |
location: 'stuff', | |
main: 'plain_old_2', | |
config: { | |
loader: 'curl/loader/legacy', | |
exports: 'testDomain.awesome', // required! | |
requires: ['test1'] | |
} | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl([test2], function (test2) { | |
// test2 is available here, test1 was loaded in advance | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More examples: