sails-crud-generators

2.0.0 • Public • Published

sails-crud-generators

A set of custom generators for use with the Sails command-line interface.

Installation

$ npm install sails-crud-generators --save

Then merge the following into your .sailsrc file:

{
  "generators": {
    "modules": {
      "db:sync": "./node_modules/sails-crud-generators/src/generators/sails-generate-sequelize-sync",
      "schema": "./node_modules/sails-crud-generators/src/generators/sails-generate-schema",
      "controller": "./node_modules/sails-crud-generators/src/generators/sails-generate-crud-controller",
      "route": "./node_modules/sails-crud-generators/src/generators/sails-generate-route",
      "api": "./node_modules/sails-crud-generators/src/generators/sails-generate-api"
    }
  }
}

Certain generators are installed by default in Sails, but they can be overridden. Other generators add support for generating entirely new kinds of things. Check out Concepts > Extending Sails > Generators for information on installing generator overrides / custom generators and information on building your own generators.

Usage

$ sails generate db:sync
$ sails generate schema <schema-name> --types json,sql --fields field1,field2,field3,..
$ sails generate controller <schema-name> --type sql|mongo
$ sails generate route <schema-name>
$ sails generate api <schema-name> --type json|sql|mongo --fields field1,field2,field3,..

Need help?

See Extending Sails > Generators > Custom Generators in the Sails documentation, or check out recommended support options.

Sails.js logo (small)

Contributing

Please observe the guidelines and conventions laid out in the Sails project contribution guide when opening issues or submitting pull requests.

License

This sequelize:sync generator is available under the MIT license.

The Sails framework is free and open-source under the MIT License.

image_squidhome@2x.png

Readme

Keywords

none

Package Sidebar

Install

npm i sails-crud-generators

Weekly Downloads

3

Version

2.0.0

License

MIT

Unpacked Size

75.8 kB

Total Files

19

Last publish

Collaborators

  • reinevan