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,8 @@
define(['specificCollection', 'bigCollection'], function (specificCollection, bigCollection) {
return {
name: 'app',
specificCollection: specificCollection,
bigCollection: bigCollection
}
});

View File

@@ -0,0 +1 @@
bigCollection

View File

@@ -0,0 +1,7 @@
define(['collection', 'text!bigCollection.html'], function (collection, html) {
return {
name: 'bigCollection',
html: html,
collection: collection
};
});

View File

@@ -0,0 +1,8 @@
define(['collectionHelper'], function (collectionHelper) {
return {
name: 'collection',
collectionHelperName: collectionHelper.name,
componentName: collectionHelper.componentName,
componentHtml: collectionHelper.componentHtml
};
});

View File

@@ -0,0 +1,7 @@
define(['component'], function (component) {
return {
name: 'collectionHelper',
componentName: component.name,
componentHtml: component.html
};
});

View File

@@ -0,0 +1,3 @@
define({
name: 'common'
});

View File

@@ -0,0 +1 @@
component

View File

@@ -0,0 +1,7 @@
define(['text!component.html'], function (html) {
return {
name: 'component',
html: html
};
});

View 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();
});
});

View 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>

View File

@@ -0,0 +1 @@
specificCollection

View File

@@ -0,0 +1,7 @@
define(['collection', 'text!specificCollection.html'], function (collection, html) {
return {
name: 'specificCollection',
html: html,
collection: collection
};
});