Created
October 11, 2012 14:44
-
-
Save caridy/3872897 to your computer and use it in GitHub Desktop.
custom loader meta using internal api vs public api
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <script src="http://yui.yahooapis.com/combo?3.7.2/yui-base/yui-base.js&3.7.2/loader-base/loader-base.js"></script> | |
| <script> | |
| YUI.add('loader-app', function (Y) { | |
| YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || { | |
| "json-stringify":{"requires":["yui-base"]}, | |
| "oop":{"requires":["yui-base"]} | |
| }; | |
| }, '', {requires:['loader-base']}); | |
| </script> | |
| <script> | |
| YUI.add('loader', function (Y) { | |
| }, '', {use:['loader-base', 'loader-app']}); | |
| </script> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> | |
| YUI().use('oop', 'json-stringify'); | |
| </script> | |
| </body> | |
| </html> |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <script src="http://yui.yahooapis.com/combo?3.7.2/yui-base/yui-base.js&3.7.2/loader-base/loader-base.js"></script> | |
| <script> | |
| YUI.add('loader-app', function (Y) { | |
| // either YUI.applyConfig or Y.applyConfig, both are failing! | |
| Y.applyConfig({ | |
| "json-stringify":{"requires":["yui-base"]}, | |
| "oop":{"requires":["yui-base"]} | |
| }); | |
| }, '', {requires:['loader-base']}); | |
| </script> | |
| <script> | |
| YUI.add('loader', function (Y) { | |
| }, '', {use:['loader-base', 'loader-app']}); | |
| </script> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> | |
| YUI().use('oop', 'json-stringify'); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment