Skip to content

Yoeman generator to create sails hooks that plugs it self in sails structure

Notifications You must be signed in to change notification settings

saviogl/generator-sails-plugin-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generator-sails-plugin-hook

Yeoman generator

Getting Started

To install generator-sails-plugin-hook from npm, run:

npm install -g generator-sails-plugin-hook

Finally, initiate the generator:

yo sails-plugin-hook

What Does It Generate ?

It generates a scaffold of a Sails Plugin Hook, which is simply a sails installable hook ( http://sailsjs.org/#!/documentation/concepts/extending-sails/Hooks/installablehooks.html ) with some aditional plugin features that allows its files to be merged upon sails lift process.

The generated plugin was developed to use the same app anatomy as a Sails App ( http://sailsjs.org/#!/documentation/anatomy/myApp ), but it has only support for Controllers, Models, Policies, Services and config:

sails-hook-your-hook-name
...
|_api
|__controllers
|__models
|__policies
|__services
|_config
...

You would create your files in these folders just as you would create files in a newly created Sails App.

Once your hook-plugin has been installed in a Sails App, those files would be merged into sails upon lift process.

Sails Plugin Hook Example

To get an idea on what is a Sails Plugin Hook check out the following:

https://www.npmjs.com/package/sails-hook-jwt-auth/

License

MIT

About

Yoeman generator to create sails hooks that plugs it self in sails structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published