3.0 source code
This commit is contained in:
8
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/app.js
vendored
Normal file
8
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/app.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
define(['specificCollection', 'bigCollection'], function (specificCollection, bigCollection) {
|
||||
|
||||
return {
|
||||
name: 'app',
|
||||
specificCollection: specificCollection,
|
||||
bigCollection: bigCollection
|
||||
}
|
||||
});
|
||||
1
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/bigCollection.html
vendored
Normal file
1
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/bigCollection.html
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bigCollection
|
||||
7
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/bigCollection.js
vendored
Normal file
7
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/bigCollection.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
define(['collection', 'text!bigCollection.html'], function (collection, html) {
|
||||
return {
|
||||
name: 'bigCollection',
|
||||
html: html,
|
||||
collection: collection
|
||||
};
|
||||
});
|
||||
8
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/collection.js
vendored
Normal file
8
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/collection.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
define(['collectionHelper'], function (collectionHelper) {
|
||||
return {
|
||||
name: 'collection',
|
||||
collectionHelperName: collectionHelper.name,
|
||||
componentName: collectionHelper.componentName,
|
||||
componentHtml: collectionHelper.componentHtml
|
||||
};
|
||||
});
|
||||
7
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/collectionHelper.js
vendored
Normal file
7
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/collectionHelper.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
define(['component'], function (component) {
|
||||
return {
|
||||
name: 'collectionHelper',
|
||||
componentName: component.name,
|
||||
componentHtml: component.html
|
||||
};
|
||||
});
|
||||
3
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/common.js
vendored
Normal file
3
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/common.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
define({
|
||||
name: 'common'
|
||||
});
|
||||
1
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/component.html
vendored
Normal file
1
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/component.html
vendored
Normal file
@@ -0,0 +1 @@
|
||||
component
|
||||
7
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/component.js
vendored
Normal file
7
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/component.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
define(['text!component.html'], function (html) {
|
||||
return {
|
||||
name: 'component',
|
||||
html: html
|
||||
};
|
||||
});
|
||||
|
||||
39
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/main.js
vendored
Normal file
39
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/main.js
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
requirejs.config({
|
||||
paths: {
|
||||
text: '../../circular/complexPlugin/slowText'
|
||||
}
|
||||
});
|
||||
|
||||
//First make sure the plugin is loaded, so that there is nothing waiting for
|
||||
//normalization.
|
||||
|
||||
require(['text'], function (text) {
|
||||
|
||||
function trim(text) {
|
||||
return text.replace(/^\s+/, '').replace(/\s+$/, '');
|
||||
}
|
||||
|
||||
require(['app'], function (app) {
|
||||
|
||||
doh.register(
|
||||
"pluginsLast",
|
||||
[
|
||||
function pluginsLast(t){
|
||||
t.is("app", app.name);
|
||||
t.is("specificCollection", app.specificCollection.name);
|
||||
t.is("specificCollection", app.specificCollection.html);
|
||||
t.is("bigCollection", app.bigCollection.name);
|
||||
t.is("bigCollection", app.bigCollection.html);
|
||||
|
||||
t.is("collection", app.bigCollection.collection.name);
|
||||
t.is("collectionHelper", app.bigCollection.collection.collectionHelperName);
|
||||
t.is("component", app.bigCollection.collection.componentName);
|
||||
t.is("component", app.bigCollection.collection.componentHtml);
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
16
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/pluginLast.html
vendored
Normal file
16
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/pluginLast.html
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>require.js: Plugin Last 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="main" src="../../../require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>require.js: Plugin Last Test</h1>
|
||||
<p>Test more complex plugin example where cycle breaking is being invoked
|
||||
when it should not. More info:
|
||||
<a href="https://github.com/jrburke/requirejs/issues/306">306</a>.</p>
|
||||
<p>Check console for messages</p>
|
||||
</body>
|
||||
</html>
|
||||
1
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/specificCollection.html
vendored
Normal file
1
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/specificCollection.html
vendored
Normal file
@@ -0,0 +1 @@
|
||||
specificCollection
|
||||
7
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/specificCollection.js
vendored
Normal file
7
OfficeWeb/vendor/requirejs/tests/plugins/pluginLast/specificCollection.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
define(['collection', 'text!specificCollection.html'], function (collection, html) {
|
||||
return {
|
||||
name: 'specificCollection',
|
||||
html: html,
|
||||
collection: collection
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user