3.0 source code

This commit is contained in:
agolybev
2015-04-28 17:59:00 +03:00
parent c69fd34bdd
commit 7b3b2248e5
16311 changed files with 1445974 additions and 3108429 deletions

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<title>require.js: Packages Config Test</title>
<script type="text/javascript" src="../../../require.js"></script>
<script type="text/javascript" src="../../doh/runner.js"></script>
<script type="text/javascript" src="../../doh/_browserRunner.js"></script>
<script>
define('sparkle/main', ['module'], function (module) {
return {
size: module.config().size
};
});
define('sparkle', ['sparkle/main'], function (main) {
return main;
})
require.config({
config: {
'sparkle/main': {
size: 'large'
},
'pixie/index': {
apiKey: 'maple'
}
},
packages: [
'sparkle',
{
name: 'pixie',
main: './index.js'
}
]
});
require(['sparkle', 'pixie'], function (sparkle, pixie) {
doh.register(
"packagesConfig",
[
function packagesConfig(t){
t.is('large', sparkle.size);
t.is('maple', pixie.apiKey);
}
]
);
doh.run();
});
</script>
</head>
<body>
<h1>require.js: Packages Config Test</h1>
<p>Make sure module config for a package is only targeted to the main
module, but is given to the module name.
<a href="https://github.com/jrburke/r.js/issues/435">More info</a></p>
<p>Check console for messages</p>
</body>
</html>