3.0 source code
This commit is contained in:
6
OfficeWeb/vendor/requirejs/tests/plugins/pluginMapSameName/plugin/plugin.js
vendored
Normal file
6
OfficeWeb/vendor/requirejs/tests/plugins/pluginMapSameName/plugin/plugin.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
define({
|
||||
load: function (id, require, load, config) {
|
||||
load(id);
|
||||
}
|
||||
});
|
||||
|
||||
19
OfficeWeb/vendor/requirejs/tests/plugins/pluginMapSameName/pluginMapSameName-tests.js
vendored
Normal file
19
OfficeWeb/vendor/requirejs/tests/plugins/pluginMapSameName/pluginMapSameName-tests.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
require({
|
||||
map: {
|
||||
'*': {
|
||||
'plugin': 'plugin/plugin'
|
||||
}
|
||||
}
|
||||
}, ['plugin!foo'], function (value) {
|
||||
|
||||
doh.register(
|
||||
'pluginMapSameName',
|
||||
[
|
||||
function pluginMapSameName(t){
|
||||
t.is('foo', value);
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
|
||||
});
|
||||
18
OfficeWeb/vendor/requirejs/tests/plugins/pluginMapSameName/pluginMapSameName.html
vendored
Normal file
18
OfficeWeb/vendor/requirejs/tests/plugins/pluginMapSameName/pluginMapSameName.html
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>require.js: Plugin Map Same Name 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="pluginMapSameName-tests.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>require.js: Plugin Map Same Name Test</h1>
|
||||
<p>Test using the map config with plugins. but include a map value that
|
||||
contains the original name of the plugin, to confirm the map translation
|
||||
is only done once:
|
||||
<a href="https://github.com/jrburke/requirejs/issues/484">484</a></p>
|
||||
<p>Check console for messages</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user