3.0 source code
This commit is contained in:
1
OfficeWeb/vendor/requirejs/tests/plugins/textDepend/test.txt
vendored
Normal file
1
OfficeWeb/vendor/requirejs/tests/plugins/textDepend/test.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
hello world
|
||||
18
OfficeWeb/vendor/requirejs/tests/plugins/textDepend/textDepend-tests.js
vendored
Normal file
18
OfficeWeb/vendor/requirejs/tests/plugins/textDepend/textDepend-tests.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
require({
|
||||
baseUrl: requirejs.isBrowser ? './' : './plugins/textDepend',
|
||||
paths: {
|
||||
'text': '../../../../text/text'
|
||||
}
|
||||
}, ['textDepend!a'],
|
||||
function (textValue) {
|
||||
|
||||
doh.register(
|
||||
'textDepend',
|
||||
[
|
||||
function textDepend(t){
|
||||
t.is('hello world', textValue);
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
});
|
||||
13
OfficeWeb/vendor/requirejs/tests/plugins/textDepend/textDepend.html
vendored
Normal file
13
OfficeWeb/vendor/requirejs/tests/plugins/textDepend/textDepend.html
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>require.js: Plugin that has text! Dependency 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="textDepend-tests.js" src="../../../require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>require.js: Plugin that has text! Dependency Test</h1>
|
||||
<p>Check console for messages</p>
|
||||
</body>
|
||||
</html>
|
||||
7
OfficeWeb/vendor/requirejs/tests/plugins/textDepend/textDepend.js
vendored
Normal file
7
OfficeWeb/vendor/requirejs/tests/plugins/textDepend/textDepend.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
define(['text!test.txt'], function (text) {
|
||||
return {
|
||||
load: function (name, req, load, config) {
|
||||
load(text);
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user