3.0 source code
This commit is contained in:
4
OfficeWeb/vendor/requirejs/tests/plugins/pluginShim/a.refine
vendored
Normal file
4
OfficeWeb/vendor/requirejs/tests/plugins/pluginShim/a.refine
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
//The refine plugin changes the word refine into define.
|
||||
refine({
|
||||
name: 'a' + window.legacy.name
|
||||
});
|
||||
4
OfficeWeb/vendor/requirejs/tests/plugins/pluginShim/legacy.js
vendored
Normal file
4
OfficeWeb/vendor/requirejs/tests/plugins/pluginShim/legacy.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
window.legacy = {
|
||||
name: 'legacy'
|
||||
};
|
||||
|
||||
22
OfficeWeb/vendor/requirejs/tests/plugins/pluginShim/pluginShim-tests.js
vendored
Normal file
22
OfficeWeb/vendor/requirejs/tests/plugins/pluginShim/pluginShim-tests.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
require({
|
||||
baseUrl: requirejs.isBrowser ? './' : './plugins/pluginShim',
|
||||
paths: {
|
||||
'text': '../../../../text/text',
|
||||
'refine': '../fromText/refine'
|
||||
},
|
||||
shim: {
|
||||
'refine!a': ['!legacy']
|
||||
}
|
||||
}, ['refine!a'],
|
||||
function (a) {
|
||||
|
||||
doh.register(
|
||||
'pluginShim',
|
||||
[
|
||||
function pluginShim(t){
|
||||
t.is('alegacy', a.name);
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
});
|
||||
15
OfficeWeb/vendor/requirejs/tests/plugins/pluginShim/pluginShim.html
vendored
Normal file
15
OfficeWeb/vendor/requirejs/tests/plugins/pluginShim/pluginShim.html
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>require.js: pluginShim Plugin Test</title>
|
||||
<script type="text/javascript" src="../../doh/runner.js"></script>
|
||||
<script type="text/javascript" src="../../doh/_browserRunner.js"></script>
|
||||
<script type="text/javascript" data-main="pluginShim-tests.js" src="../../../require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>require.js: pluginShim Plugin Test</h1>
|
||||
<p>Confirms that shim config works with plugin resources. More info:
|
||||
<a href="https://github.com/jrburke/requirejs/issues/324">324</a>.
|
||||
<p>Check console for messages</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user