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,6 @@
define(function (require) {
return {
name: 'baz',
foo: require('./foo')
};
});

View File

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

View File

@@ -0,0 +1,21 @@
require({
baseUrl: "./",
paths: {
"bar/foo": "foo2"
}
},
["require", "bar/baz"],
function(require, baz) {
doh.register(
"relativeNormalize",
[
function relativeNormalize(t){
t.is("baz", baz.name);
t.is("foo2", baz.foo.name);
}
]
);
doh.run();
}
);

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>require.js: Relative Normalize 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="relativeNormalize-tests" src="../../../require.js"></script>
</head>
<body>
<h1>require.js: Relative Normalize Test</h1>
<p>Make sure relative require inside a module gets normalized using paths config.
More info in <a href="https://github.com/jrburke/requirejs/issues/294">294</a></p>
<p>Check console for messages</p>
</body>
</html>