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,5 @@
//The refine plugin changes the word refine into define.
refine({
name: 'a'
//Notice missing curly
);

View File

@@ -0,0 +1,7 @@
//The refine plugin changes the word refine into define.
refine(function (require, exports, module) {
return {
name: 'b',
color: module.config().color
};
});

View File

@@ -0,0 +1,23 @@
require.config({
baseUrl: requirejs.isBrowser ? './' : './plugins/fromTextEvalError',
paths: {
'refine': '../fromText/refine',
'text': '../../../../text/text'
}
});
require(['refine!a'], function (a) {
//This should not be called
}, function (err) {
var message = err + '';
doh.register(
'pluginsFromTextEvalError',
[
function pluginsFromTextEvalError(t){
t.is(-1, message.indexOf('timeout'));
}
]
);
doh.run();
});

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>require.js: fromText Eval Error Plugin 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="fromTextEvalError-tests.js" src="../../../require.js"></script>
</head>
<body>
<h1>require.js: fromText Eval Error Plugin Test</h1>
<p>Trigger errbacks for plugin fromText eval errors. <a href="https://github.com/jrburke/requirejs/issues/583">More info</a>.</p>
<p>Check console for messages</p>
</body>
</html>