Generators

Status

Stability: 2 - Unstable

The API is in the process of settling, but has not yet had sufficient real-world testing to be considered stable.

Backwards-compatibility will be maintained if reasonable.

Purpose

What is my purpose in this world?

old partial content from when spec was an itty bitty baby

Generators are designed to make it easier to customize the sails new and sails generate command-line tools, and provide better support for different Gruntfiles, configuration options, view engines, coffeescript, etc.

Structure

A generator has either:

(1) a generate method, or

(2) a configure + render method (render may be omitted in the simplest of cases)

Sails

  1. app (appPath + name)
  2. <- view
  3. <- folder
  4. <- jsonfile
  5. <- file
  6. api (appPath + name)
  7. <- controller
  8. <- model
  9. controller (appPath + template + name)
  10. <- file
  11. model (appPath + template + name)
  12. <- file
  13. view (appPath + template + name)
  14. <- file
  15. file (destination + name + template + data)
  16. jsonfile (destination + name + data)
  17. folder (destination + name)