Skip to content

bhaskarmelkani/sails-generate-views-hbs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sails-generate-views-hbs

A views-hbs generator for use with the Sails command-line interface.

Certain generators are installed by default in Sails, but they can be overridden. Other generators create entirely new things. Check the Sails docs for information on installing generator overrides / custom generators and information on building your own generators.

Dependency Status    npm version    GitHub issues

1. Installation

$ npm install sails-generate-views-hbs

2. Usage

On the command line
$ sails generate views-hbs

3. Configuration in sails.

#####File to update:- config/views.js Update the file as follows.

module.exports.views = {

engine: {
    ext: 'handlebars',
    fn: require("consolidate").handlebars
  },

layout: 'layouts/layout',

partials: 'partials/'

};

That is it. Now sails should compile the handlebars files and serve it to you.

Development

To get started quickly and see this generator in action, ...

Also see CONTRIBUTING.md for more information on overriding/enhancing existing generators.

Questions?

See FAQ.md.

More Resources

License

MIT © 2017 balderdashy & contributors

As for Sails? It's free and open-source under the MIT License.

image_squidhome@2x.png

Releases

No releases published

Packages

No packages published