slush-ares

1.1.7 • Public • Published
_______  ______    _______  _______
|   _   ||    _ |  |       ||       |
|  |_|  ||   | ||  |    ___||  _____|
|       ||   |_||_ |   |___ | |_____
|       ||    __  ||    ___||_____  |
|   _   ||   |  | ||   |___  _____| |
|__| |__||___|  |_||_______||_______|

Slush-ares

NPM

npm version Dependency Status

Pull Requests Status Issues Status

A Slush generator for APIs

Forked from slush-athena.

Installation

To use this generator you must have gulp and slush installed:

$ npm install -g gulp slush

Then install the generator:

$ npm install -g slush-ares

Usage

Scaffold API

With the generator installed make a new project directory:

$ mdkir new_project
$ cd new_project

Scaffold your API:

$ slush ares

This will generate the following files:

.
├── .aresrc
├── .gitignore
├── .jshintrc
├── .travis.yml
├── README.md
├── build-config.js
├── gulpfile.js
├── package.json
├── server
│   ├── api
│   │   └── index.js
│   ├── app.js
│   ├── config
│   │   ├── environment
│   │   │   ├── development.js
│   │   │   ├── index.js
│   │   │   ├── production.js
│   │   │   └── test.js
│   │   ├── express.js
│   │   └── seed
│   │       └── .gitkeep
│   ├── lib
│   │   └── .gitkeep
│   └── routes.js
└── tasks
    ├── lint.js
    └── test.js

Scaffold Controller

$ slush ares:controller

Follow the prompts, and be sure to use a capital case name.

This will generate the following files:

.
├── server
│   ├── api
│       ├── <controller-name>
│           ├── index.js
│           ├── <controller-name>.controller.js
│           └── <controller-name>.controller.spec.js

Scaffold Model

$ slush ares:model

Follow the prompts, and be sure to use a capital case name.

This will generate the following files:

.
├── server
│   ├── api
│       ├── <model-name>
│           ├── <model-name>.model.js
│           └── <model-name>.model.spec.js

Scaffold CRUD

$ slush ares:crud

CRUD stands for Create Read Update Delete.

Follow the prompts to generate CRUD endpoints for your model.

.
├── server
│   ├── api
│   └── <model-name>
│       ├── index.js
│       ├── <model-name>.controller
│       │   ├── createOrder
│       │   │   ├── create<model-name>.spec.js
│       │   │   └── index.js
│       │   ├── delete<model-name>
│       │   │   ├── delete<model-name>.spec.js
│       │   │   └── index.js
│       │   ├── get<model-name>
│       │   │   ├── get<model-name>.spec.js
│       │   │   └── index.js
│       │   ├── index.js
│       │   └── update<model-name>
│       │       ├── index.js
│       │       └── update<model-name>.spec.js
│       ├── <model-name>.model.js
│       └── <model-name>.model.spec.js

Package Sidebar

Install

npm i slush-ares

Weekly Downloads

1

Version

1.1.7

License

none

Last publish

Collaborators

  • prestonvanloon