crud-scaffolder

1.0.2 • Public • Published

crud-scaffolder

A very minute library to create a basic scaffold for a given Crud Folder

Installation

npm install crud-scaffolder -g

Usage

$ scaffold user

The above command would create a folder structure in the current folder like mentioned below:

  • user
    • create.js
    • get.js
    • list.js
    • update.js
    • remove.js
    • user.js

The content of user.js file will be:

    module.exports = {
        create: (require('./create')),
        get: (require('./get')),
        list: (require('./list')),
        update: (require('./update')),
        remove: (require('./remove')),
    }

The content in the rest of the files will be:

    module.exports = function (req, res) {
 
    }

If you input something like 'user-account', then the user.js file would be renamed to userAccount.js i.e, it camelizes the given input for the main file.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i crud-scaffolder

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • akashbabu