update to latest htmljs-parser and add new-style scriptlet test

This commit is contained in:
Michael Rawlings 2017-01-30 19:45:10 -08:00
parent 44c38e74ad
commit 1852e378f0
3 changed files with 38 additions and 1 deletions

View File

@ -59,7 +59,7 @@
"events": "^1.0.2",
"events-light": "^1.0.0",
"he": "^1.1.0",
"htmljs-parser": "^2.2.3",
"htmljs-parser": "^2.3.0",
"lasso-modules-client": "^2.0.3",
"lasso-package-root": "^1.0.0",
"listener-tracker": "^2.0.0",

View File

@ -0,0 +1,24 @@
var marko_template = module.exports = require("marko/html").t(__filename),
marko_helpers = require("marko/runtime/html/helpers"),
marko_escapeXml = marko_helpers.x;
function render(input, out) {
var data = input;
var foo = 123;
function bar() {
}
var baz = 456;
out.w("<div>");
console.log('foo');
out.w(" Hello there " +
marko_escapeXml(name) +
"</div>");
}
marko_template._ = render;

View File

@ -0,0 +1,13 @@
$ var foo = 123;
$ {
function bar() {
}
var baz = 456;
}
<div>
$ console.log('foo');
Hello there ${name}
</div>