sails-generate-spar v0.0.4
sails-generate-spar
THIS PROJECT WAS MOVED TO sails-generate-scaffold
A spar generator for use with the Sails command-line interface. A spar generates a scaffold of a sails project. The scaffold consists of a user model, a controller with index, new, create, edit, update, and destroy actions, as well as the associated views. The spar generator will also create a policy that enables flash messages for errors on the new and edit views.
To install:
$ npm install sails-generate-sparNext open up the .sailsrc file located in the root of your sails project. Add the spar by typing:
{
"generators": {
"modules": {
"spar": "sails-generate-spar"
}
}
}To create a spar
On the command line
$ sails generate spar <a name for your spar> <optional: attributename:attributetype> <optional: --force>Example:
$ sails generate spar user name:string age:integer email:emailThe first argument will be the model and controller name. You can add any number of model attributes and types. Finally, you can overwrite an existing spar by using the --force parameter.
More Resources
License
MIT © 2014 irlnathan & contributors
As for Sails? It's free and open-source under the MIT License.
