mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Marko v3: Tests for resolving paths and templates
This commit is contained in:
parent
b6d0dbcd7f
commit
5d2b43b88e
1
test/fixtures/render/autotest/attr-path/expected.html
vendored
Normal file
1
test/fixtures/render/autotest/attr-path/expected.html
vendored
Normal file
@ -0,0 +1 @@
|
||||
File: FOO!
|
||||
6
test/fixtures/render/autotest/attr-path/foo-tag.js
vendored
Normal file
6
test/fixtures/render/autotest/attr-path/foo-tag.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
var fs = require('fs');
|
||||
|
||||
module.exports = function(input, out) {
|
||||
out.write('File: ' + fs.readFileSync(input.file, { encoding: 'utf8' }) );
|
||||
|
||||
};
|
||||
1
test/fixtures/render/autotest/attr-path/foo.txt
vendored
Normal file
1
test/fixtures/render/autotest/attr-path/foo.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
FOO!
|
||||
6
test/fixtures/render/autotest/attr-path/marko-taglib.json
vendored
Normal file
6
test/fixtures/render/autotest/attr-path/marko-taglib.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"<foo>": {
|
||||
"renderer": "./foo-tag.js",
|
||||
"@file": "path"
|
||||
}
|
||||
}
|
||||
1
test/fixtures/render/autotest/attr-path/template.marko
vendored
Normal file
1
test/fixtures/render/autotest/attr-path/template.marko
vendored
Normal file
@ -0,0 +1 @@
|
||||
<foo file="./foo.txt"/>
|
||||
1
test/fixtures/render/autotest/attr-template/expected.html
vendored
Normal file
1
test/fixtures/render/autotest/attr-template/expected.html
vendored
Normal file
@ -0,0 +1 @@
|
||||
Rendered template:[foo-template]
|
||||
4
test/fixtures/render/autotest/attr-template/foo-tag.js
vendored
Normal file
4
test/fixtures/render/autotest/attr-template/foo-tag.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
module.exports = function(input, out) {
|
||||
out.write('Rendered template:');
|
||||
input.template.render({}, out);
|
||||
};
|
||||
1
test/fixtures/render/autotest/attr-template/foo-template.marko
vendored
Normal file
1
test/fixtures/render/autotest/attr-template/foo-template.marko
vendored
Normal file
@ -0,0 +1 @@
|
||||
- [foo-template]
|
||||
6
test/fixtures/render/autotest/attr-template/marko-taglib.json
vendored
Normal file
6
test/fixtures/render/autotest/attr-template/marko-taglib.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"<foo>": {
|
||||
"renderer": "./foo-tag.js",
|
||||
"@template": "template"
|
||||
}
|
||||
}
|
||||
1
test/fixtures/render/autotest/attr-template/template.marko
vendored
Normal file
1
test/fixtures/render/autotest/attr-template/template.marko
vendored
Normal file
@ -0,0 +1 @@
|
||||
<foo template="./foo-template.marko"/>
|
||||
Loading…
x
Reference in New Issue
Block a user