Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhaskarmelkani/sails-generate-views-hbs
Generate default views for a Sails app using handlebar templates,
https://github.com/bhaskarmelkani/sails-generate-views-hbs
generator handlebars hbs js sails sails-generator sailsjs templates views
Last synced: about 1 month ago
JSON representation
Generate default views for a Sails app using handlebar templates,
- Host: GitHub
- URL: https://github.com/bhaskarmelkani/sails-generate-views-hbs
- Owner: bhaskarmelkani
- License: mit
- Created: 2017-02-27T14:10:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-01T21:22:51.000Z (almost 8 years ago)
- Last Synced: 2024-11-14T13:44:37.323Z (2 months ago)
- Topics: generator, handlebars, hbs, js, sails, sails-generator, sailsjs, templates, views
- Language: HTML
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](http://sailsjs.org/#!documentation) for information on installing generator overrides / custom generators and information on building your own generators.
[![Dependency Status](https://david-dm.org/bhaskarmelkani/sails-generate-views-hbs/status.svg?style=flat)](https://david-dm.org/bhaskarmelkani/sails-generate-views-hbs) [![npm version](https://img.shields.io/npm/v/sails-generate-views-hbs.svg)](https://badge.fury.io/js/sails-generate-views-hbs) [![GitHub issues](https://img.shields.io/github/issues/bhaskarmelkani/sails-generate-views-hbs.svg)](https://github.com/bhaskarmelkani/sails-generate-views-hbs/issues)
### 1. Installation
```sh
$ npm install sails-generate-views-hbs
```### 2. Usage
##### On the command line
```sh
$ sails generate views-hbs
```### 3. Configuration in sails.
#####File to update:- config/views.js
Update the file as follows.```js
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
- [Stackoverflow](http://stackoverflow.com/questions/tagged/sails.js)
- [#sailsjs on Freenode](http://webchat.freenode.net/) (IRC channel)
- [Twitter](https://twitter.com/sailsjs)
- [Professional/enterprise](https://github.com/balderdashy/sails-docs/blob/master/FAQ.md#are-there-professional-support-options)
- [Tutorials](https://github.com/balderdashy/sails-docs/blob/master/FAQ.md#where-do-i-get-help)
-### License
**[MIT](./LICENSE)**
© 2017 [balderdashy](http://github.com/balderdashy) & contributorsAs for [Sails](http://sailsjs.org)? It's free and open-source under the [MIT License](http://sails.mit-license.org/).
![[email protected]](http://i.imgur.com/RIvu9.png)