Socket
Book a DemoInstallSign in
Socket

egg-view-swig-pagelet

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-view-swig-pagelet

基于egg-view-swig插件扩展, 支持scrat pagelet 模式

2.2.0
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

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

Keywords

egg

FAQs

Package last updated on 05 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.