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(function (require) {
return {
name: "one",
threeName: require("three").name,
threeName2: require("three").name
};
});

View File

@@ -0,0 +1,3 @@
define("three", {
name: "three"
});

View File

@@ -0,0 +1,8 @@
define("two", ["one", "three", "one"], function (one, three, one2) {
return {
name: "two",
oneName: one.name,
oneName2: one2.name,
threeName: three.name
};
});

View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<title>require.js: Unique Dependency 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">
require({
baseUrl: "./"
},
["require", "one", "two", "three"],
function(require, one, two, three) {
doh.register(
"uniques",
[
function uniques(t){
t.is("one", one.name);
t.is("three", one.threeName);
t.is("three", one.threeName2);
t.is("one", two.oneName);
t.is("one", two.oneName2);
t.is("two", two.name);
t.is("three", two.threeName);
t.is("three", three.name);
}
]
);
doh.run();
}
);
</script>
</head>
<body>
<h1>require.js: Unique Dependency Test</h1>
<p>Make sure if a dependency is listed more than once code still operates correctly.</p>
<p>Check console for messages</p>
</body>
</html>