Closed zswang closed 8 years ago
example:MetaScript + EJS
input:
/*<jdists encoding="metascript" VERSION="1.0">*/ MyLibrary.VERSION = "/*?= VERSION */"; /*</jdists>*/ /*<jdists encoding="ejs" data="[1, 2, 3, '8 + 6']">*/ <% forEach(function (item) { %> console.log(<%- item %>); <% });%> /*</jdists>*/
output:
MyLibrary.VERSION = "1.0"; console.log(1); console.log(2); console.log(3); console.log(8 + 6);
Please refer to the more: https://github.com/zswang/jdists/tree/master/test/fixtures https://github.com/zswang/jdists/blob/master/processor/processor-metascript.js
Please know, Thanks.
example:MetaScript + EJS
input:
output:
Please refer to the more: https://github.com/zswang/jdists/tree/master/test/fixtures https://github.com/zswang/jdists/blob/master/processor/processor-metascript.js
Please know, Thanks.