lasso-marko

Lasso.js plugin to support compilation of Marko templates

MIT 38 个版本
安装
npm install lasso-marko
yarn add lasso-marko
pnpm add lasso-marko
bun add lasso-marko
README

lasso-marko

NOTE: lasso-marko@4 requires marko >= 5, @marko/compiler >= 5.33 and lasso >= 3. For older versions use lasso-marko@3.

Plugin for the Lasso.js to support compilation and transport of Marko template files. Templates are compiled using the Marko compiler that produces a CommonJS module as output.

Usage

npm install lasso-marko --save

Register the plugin when configuring the lasso. For example:

require('lasso').configure({
    "plugins": [
        ...
        "lasso-marko"
    ]
    ...
});

Required Marko templates will automatically be found via static code analysis when loaded, eg like:

var template = require('./template.marko');

template.render({
        name: 'Frank'
    },
    function(err, output) {
        console.log(output);
    });

To explicitly declare templates that may not be discovered via static code analysis of CommonJS modules, you can also choose to declare Marko template dependencies in an browser.json file.

{
    "dependencies": [
        "marko-dependencies: ./template.marko"
    ]
}

Contributors

Contribute

Pull Requests welcome. Please submit Github issues for any feature enhancements, bugs or documentation problems.

License

Apache License v2.0

版本列表
5.0.3 2026-01-30
5.0.2 2026-01-30
5.0.1 2024-06-01
5.0.0 2024-05-31
4.0.0 2023-08-10
3.2.1 2022-09-28
3.2.0 2022-09-27
3.1.2 2022-09-27
3.1.1 2021-08-31
3.1.0 2021-08-20
3.0.2 2021-08-19
3.0.1 2021-01-21
3.0.0 2021-01-21
2.5.0 2020-05-13
2.4.9 2020-04-10
2.4.8 2019-09-18
2.4.7 2019-03-07
2.4.6 2018-10-24
2.4.5 2018-10-23
2.4.4 2018-07-19
2.4.3 2018-07-19
2.4.2 2018-05-22
2.4.1 2018-05-14
2.4.0 2017-11-30
2.3.2-0 2017-10-19
2.3.1 2017-10-02
2.3.0 2017-03-02
2.2.2 2017-01-26
2.2.1 2017-01-07
2.2.0 2016-12-29
2.1.0 2016-11-12
2.0.7 2016-02-18
2.0.6 2016-02-18
2.0.5 2016-02-18
2.0.4 2015-05-20
2.0.3 2015-04-28
2.0.2 2015-04-10
2.0.1 2015-04-10