3.0 source code
This commit is contained in:
16
OfficeWeb/vendor/requirejs/tests/plugins/pluginBundles/main.js
vendored
Normal file
16
OfficeWeb/vendor/requirejs/tests/plugins/pluginBundles/main.js
vendored
Normal 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
|
||||
};
|
||||
});
|
||||
17
OfficeWeb/vendor/requirejs/tests/plugins/pluginBundles/pluginBundles-tests.js
vendored
Normal file
17
OfficeWeb/vendor/requirejs/tests/plugins/pluginBundles/pluginBundles-tests.js
vendored
Normal 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();
|
||||
|
||||
});
|
||||
16
OfficeWeb/vendor/requirejs/tests/plugins/pluginBundles/pluginBundles.html
vendored
Normal file
16
OfficeWeb/vendor/requirejs/tests/plugins/pluginBundles/pluginBundles.html
vendored
Normal 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>
|
||||
Reference in New Issue
Block a user