-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcli.js
executable file
·32 lines (29 loc) · 1.29 KB
/
cli.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env node
const chalk = require('chalk');
const clear = require('clear');
const figlet = require('figlet');
clear();
console.log(
chalk.yellow(
figlet.textSync('Koi', { horizontalLayout: 'full' }),
'\n A simple CLI made to generate base files and migration files',
'\n Must be used with koa-typescript-api-v2 (https://code.98labs.com/boilerplates/koa-typescript-api-v2.git)',
'\n By: 98Labs, Inc',
'\n Repo: https://github.com/98labs/koi-cli.git'
),
chalk.white(
'\n -----------------------------------------------------------------',
'\n',
'\n Commands:',
'\n - koi-generate:config <tableName> Run to generate json file for structuring table attributes',
'\n example: koi-generate:config user',
'\n',
'\n - koi-generate:base <tableName> Run to generate base files (models, controllers, routes, transformers, services)',
'\n example: koi-generate:base user',
'\n',
'\n - koi-generate:migration Run to generate migration files from config/ .json for sequelize to use',
'\n example: koi-generate:migration',
'\n',
'\n -----------------------------------------------------------------'
)
);