├── test ├── specs │ ├── stream │ │ ├── output.html │ │ ├── input.ajs │ │ └── input.js │ ├── render │ │ ├── simple │ │ │ ├── output.html │ │ │ ├── input.ajs │ │ │ └── input.js │ │ ├── encode │ │ │ ├── input.ajs │ │ │ ├── output.html │ │ │ └── input.js │ │ ├── json-stringify │ │ │ ├── input.js │ │ │ ├── output.html │ │ │ └── input.ajs │ │ ├── async │ │ │ ├── output.html │ │ │ ├── input.ajs │ │ │ └── input.js │ │ └── for-loop │ │ │ ├── input.js │ │ │ ├── output.html │ │ │ └── input.ajs │ └── compile │ │ ├── runtime-errors-in-partials │ │ ├── error.txt │ │ ├── input.js │ │ ├── partials │ │ │ ├── foo │ │ │ │ └── bar.ajs │ │ │ └── partial.ajs │ │ └── input.ajs │ │ ├── simple-include │ │ ├── partial.ajs │ │ ├── output.html │ │ ├── input.js │ │ └── input.ajs │ │ ├── partials-in-dirs │ │ ├── partials │ │ │ └── partial.ajs │ │ ├── output.html │ │ ├── input.js │ │ └── input.ajs │ │ └── partials-in-partials │ │ ├── partials │ │ ├── foo │ │ │ └── bar.ajs │ │ └── partial.ajs │ │ ├── input.js │ │ ├── input.ajs │ │ └── output.html └── index.js ├── examples ├── from-file │ ├── input.ajs │ └── index.js ├── server │ ├── public │ │ ├── partials │ │ │ ├── footer.ajs │ │ │ ├── post.ajs │ │ │ └── header.ajs │ │ ├── css │ │ │ └── site.css │ │ └── index.ajs │ ├── server.js │ └── context.js ├── async-from-file │ ├── input.ajs │ └── index.js ├── simple │ └── example.js ├── middleware │ ├── public │ │ └── css │ │ │ └── site.css │ ├── views │ │ └── index.ajs │ └── server.js └── index.js ├── .gitignore ├── .github └── FUNDING.yml ├── LICENSE ├── lib ├── cache.js ├── util.js ├── index.js ├── lexer.js ├── template.js ├── grammar.js ├── compiler.js └── parser.js ├── CONTRIBUTING.md ├── bin └── cli.js ├── package.json ├── DOCUMENTATION.md └── README.md /test/specs/stream/output.html: -------------------------------------------------------------------------------- 1 | Welcome to Foo! 2 | -------------------------------------------------------------------------------- /test/specs/render/simple/output.html: -------------------------------------------------------------------------------- 1 | Welcome to Foo! 2 | -------------------------------------------------------------------------------- /test/specs/stream/input.ajs: -------------------------------------------------------------------------------- 1 | Welcome to <%= title %>! 2 | -------------------------------------------------------------------------------- /test/specs/render/simple/input.ajs: -------------------------------------------------------------------------------- 1 | Welcome to <%= title %>! 2 | -------------------------------------------------------------------------------- /test/specs/render/encode/input.ajs: -------------------------------------------------------------------------------- 1 | <%= title %> 2 | <%- html %> 3 | -------------------------------------------------------------------------------- /test/specs/render/json-stringify/input.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /test/specs/compile/runtime-errors-in-partials/error.txt: -------------------------------------------------------------------------------- 1 | bar.ajs:3 2 | -------------------------------------------------------------------------------- /test/specs/compile/simple-include/partial.ajs: -------------------------------------------------------------------------------- 1 | Content from partial. 2 | -------------------------------------------------------------------------------- /test/specs/compile/partials-in-dirs/partials/partial.ajs: -------------------------------------------------------------------------------- 1 | Content from partial. 2 | -------------------------------------------------------------------------------- /test/specs/compile/partials-in-partials/partials/foo/bar.ajs: -------------------------------------------------------------------------------- 1 | Another partial. 2 | -------------------------------------------------------------------------------- /test/specs/stream/input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "title": "Foo" 3 | }; 4 | -------------------------------------------------------------------------------- /test/specs/render/simple/input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "title": "Foo" 3 | }; 4 | -------------------------------------------------------------------------------- /test/specs/compile/partials-in-dirs/output.html: -------------------------------------------------------------------------------- 1 | Welcome to Foo! 2 | Content from partial. 3 | -------------------------------------------------------------------------------- /test/specs/compile/simple-include/output.html: -------------------------------------------------------------------------------- 1 | Welcome to Foo! 2 | Content from partial. 3 | -------------------------------------------------------------------------------- /test/specs/compile/partials-in-dirs/input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "title": "Foo" 3 | }; 4 | -------------------------------------------------------------------------------- /test/specs/compile/simple-include/input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "title": "Foo" 3 | }; 4 | -------------------------------------------------------------------------------- /test/specs/compile/partials-in-partials/input.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "title": "Foo" 3 | }; 4 | -------------------------------------------------------------------------------- /test/specs/compile/simple-include/input.ajs: -------------------------------------------------------------------------------- 1 | Welcome to <%= title %>! 2 | <% include('partial') -%> 3 | -------------------------------------------------------------------------------- /test/specs/render/encode/output.html: -------------------------------------------------------------------------------- 1 | <script>alert('evil')</script> 2 |