// 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 @@
.hidden
@@ -0,0 +1 @@
main.html
@@ -0,0 +1,8 @@
define(function (require) {
return {
html: require('text!./main.html'),
noext: require('text!sub/noext'),
hidden: require('text!.hidden.html'),
util: require('sub/util')
};
});
@@ -0,0 +1,7 @@
define(function (require) {
return {
noext: require('text!../noext'),
dirPath: require.toUrl('.'),
parentPath: require.toUrl('..')
};
});
@@ -0,0 +1 @@
noext
@@ -0,0 +1,8 @@
define(function (require) {
return {
dotPath: require.toUrl('.'),
html: require('text!./util.html'),
auxHtml: require('text!../auxil.html'),
thing: require('./nested/thing')
};
});
@@ -0,0 +1,30 @@
require.config({
paths: {
text: '../../../text/text'
}
});
require(['main'], function(main) {
var subRegExp = /\/sub$/,
nestedRegExp = /\/sub\/nested$/;
doh.register(
"toUrl",
[
function toUrl(t){
t.is(".hidden", main.hidden);
t.is("main.html", main.html);
t.is("noext", main.noext);
t.is("aux", main.util.auxHtml);
t.is(true, subRegExp.test(main.util.dotPath));
t.is("util", main.util.html);
t.is(true, nestedRegExp.test(main.util.thing.dirPath));
t.is(true, subRegExp.test(main.util.thing.parentPath));
t.is("noext", main.util.thing.noext);
}
]
);
doh.run();
});
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>require.js: toUrl Test</title>
<script src="../doh/runner.js"></script>
<script src="../doh/_browserRunner.js"></script>
<script src="../../require.js"></script>
<script src="toUrl-tests.js"></script>
</head>
<body>
<h1>require.js: toUrl Test</h1>
<p>Check console for messages</p>
</body>
</html>