Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 模式

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
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

FAQs

Package last updated on 13 Apr 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc