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,16 @@
define('text', [], {
load: function () {
throw new Error('not implemented');
}
});
define('text!template.html', [], function () {
return 'main template';
});
define('main', ['text!template.html'], function(template) {
return {
name: 'main',
template: template
};
});

View File

@@ -0,0 +1,17 @@
require({
bundles: {
'main': ['text', 'text!template.html']
}
}, ['text!template.html'], function (template) {
doh.register(
'pluginBundles',
[
function pluginBundles(t){
t.is('main template', template);
}
]
);
doh.run();
});

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>require.js: Plugin Bundles 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 type="text/javascript" src="pluginBundles-tests.js"></script>
</head>
<body>
<h1>require.js: Plugin Bundles Test</h1>
<p>Test using the bundles config with plugins. More info:
<a href="https://github.com/jrburke/requirejs/issues/497">497</a></p>
<p>Check console for messages</p>
</body>
</html>