1.4.12 • Published 7 years ago
egg-view-banks-hbs v1.4.12
egg-view-banks-hbs
egg view plugin for handlebars
Usage
// {app_root}/config/plugin.js
exports.hbs = {
  enable: true,
  package: 'egg-view-banks-hbs',
};// {app_root}/config/config.default.js
/**
 * view
 * @member
 * @property defaultViewEngine: string setup default view engine
 * @property defaultExtension: string template file extension
 * @property mapping: Object {string: string}
 */
exports.view = {
  defaultViewEngine: 'hbs',
  defaultExtension: '.hbs',
  mapping: {
    '.hbs': 'hbs',
  },
};Register Partial
Partials are loaded from app/view/partials by default, you can define user_message.hbs and use userMessage as partial.
Note:
- The file name will be camelized, e.x. 
foo_bar > fooBar,foo-bar > fooBar - Don't support cascade directory
 
Configuration
see config/config.default.js for more detail.
Questions & Suggestions
Please open an issue here.
License
1.4.12
7 years ago