UNPKG

sails-generate-dscontroller

Version:

Generate a DS controller for Sails.

62 lines (37 loc) 1.47 kB
# sails-generate-dscontroller A `controller` generator (with crud actions) for use with the Sails command-line interface. ### Installing this generator > Certain generators are installed by default in Sails, but they can be overridden. Check the [Sails docs](http://sailsjs.org/#!documentation) for information on installing generator overrides / custom generators. ##### For a particular app In your app directory: ```sh $ npm install sails-generate-dscontroller ``` Then edit this project's `./.sailsrc` file (see below for details). If no local `.sailsrc` file exists yet, you can just create one. ### Usage Now that the generator is installed, you can test it: ```sh $ sails generate dscontroller foobar create read update delete ``` ##### Configuring a `.sailsrc` file to use this generator in place of `sails generate controller` Add or replace the module used for generating a "controller": ```json { "generators": { "modules": { "controller": "sails-generate-dscontroller" } } } ``` And test ```sh $ sails generate controller foobar create read update delete ``` ### Questions? See `FAQ.md`. ### License **[MIT](./LICENSE)** © 2014 [balderdashy](http://github.com/balderdashy) & [contributors] [Mike McNeil](http://michaelmcneil.com), [Balderdash](http://balderdash.co) & contributors [Sails](http://sailsjs.org) is free and open-source under the [MIT License](http://sails.mit-license.org/).