Created
November 14, 2011 18:50
-
-
Save jiggliemon/1364743 to your computer and use it in GitHub Desktop.
Library dependencies.
This file contains hidden or 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
// Defined in Framework | |
// Uses Mootools | |
define(['./localFile','Milk/core/Class'], function(local, Class) { | |
... | |
}); |
This file contains hidden or 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
// Defined in `Framework` | |
// Uses both Mootools and Polyfills | |
define(['./localFile','../../lib/Milk/core/Class', 'Polyfills/Array/Array.isArray'], function(local, Class) { | |
... | |
}); |
This file contains hidden or 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
require({ | |
packages: [ | |
{ | |
name: 'Poly' | |
,location: '/js/lib/Polyfills/Source' | |
} | |
{ | |
name: 'Mootools' | |
,location: '/js/lib/Milk/Source' | |
} | |
,{ | |
name: 'Framework' | |
// this framework names Mootools as Milk | |
// and Polyfills as Polyfills | |
,location: '/js/lib/Other/Framework' | |
} | |
,{ | |
name: 'App' | |
,location: '/js/app/' | |
} | |
] | |
,callback: function () { | |
//.. make shit happen | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's a complex problem for sure. Devs want to configure their apps and/or frameworks in all sorts of crazy ways. To my knowledge, @cadorn is the only one who's come up with a way to handle all (sane) use cases (via Package/Mappings/C) in BravoJs/PINF, including the ones you've described, @arian. https://github.com/cadorn/pinf