// some work on style sheets

This commit is contained in:
Kevin Granger
2013-07-18 18:51:24 +02:00
parent 02921dc9d0
commit 0b4512dbcb
1654 changed files with 171753 additions and 294 deletions
@@ -0,0 +1,56 @@
var globals = {};
define('plug',{
load: function () {
throw new Error('Cannot dynamically load');
}
});
define('app/test',[], function() {
return { name: 'test' };
});
define('app/test2',[], function() {
return { name: 'test2' };
});
define('plug!app/main',["!app/test", "!app/test2"], function(test, test2) {
return {
name: 'main',
test: test,
test2: test2
};
});
require(["plug!app/main"],
function(main) {
globals.main = main;
}
);
define("app/run", function(){});
require({
baseUrl: "./"
},
["app/run"],
function() {
require(["plug!app/main"], function () {
doh.register(
"requirePluginLoad",
[
function requirePluginLoad(t){
var main = globals.main;
t.is("main", main.name);
t.is("test", main.test.name);
t.is("test2", main.test2.name);
}
]
);
doh.run();
});
}
);
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>require.js: Require Plugin Load 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" src="requirePluginLoad-tests.js"></script>
</head>
<body>
<h1>require.js: Require Plugin Load Test</h1>
<p>Make sure two requires in a built file that has inlined plugin
resources do not call the plugin's load method. See
<a href="https://github.com/jrburke/requirejs/issues/256">ticket 256</a>
for more information.</p>
<p>Check console for messages</p>
</body>
</html>