1.0.2 • Published 7 years ago

crud-scaffolder v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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.