3.0.0 • Published 6 years ago

egg-view-swig-pagelet v3.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

egg-view-swig-pagelet

Support the view rendering implementation of the scrat pagelet. Depends on the egg-view-swig template view engine.

Pagelet: https://github.com/scrat-team/scrat-swig

NOTE: swig is NOT MAINTAINED.

DOCS: http://node-swig.github.io/swig-templates

Install

$ npm i egg-view-swig-pagelet --save

Usage

// {app_root}/config/plugin.js
exports.swigPagelet = {
  enable: true,
  package: 'egg-view-swig-pagelet',
};
// {app_root}/config/config.default.js
exports.swigPagelet = {
  // default layout template config for view base dir
  // layout: 'layout/layout.tpl',
  // default scrat resource manifest path
  // manifest: path.join(app.baseDir, 'config/manifest.json')
};

Render in controller

exports.home = function* (ctx) {
  yield ctx.render('home.tpl', { list });
};

Configuration

see config/config.default.js for more detail.

Questions & Suggestions

Please open an issue here.

License

MIT

3.0.0

6 years ago

2.2.0

6 years ago

2.1.4-pwa

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago