momi-foundation-coding / nodejs-api-cli

This is a scaffold for generating new API-based application for NodeJS and its frameworks such as Express, kemboijs, koa, AdonisJs etc.
http://www.kemboijs.org/
MIT License
10 stars 13 forks source link

Allow user to add options to when creating application #1

Closed ezkemboi closed 4 years ago

ezkemboi commented 5 years ago

This issue is big, but I will break down:

In this stage: I need an algorithm/solution to allow users to add different parts/dependencies, e.g

kemboijs-cli myapp fram=express db=postgres, sequelize test=mocha, chai, chai-http

Or

kemboijs-cli myapp fram=express db=mongo,mongoose --no-tests

In the first example, I expect that the framework is set as express, then db to be postgres with help of sequelize ORM. Also, it will set tests based on the tools available.

In the second example, it will not set any tests. When a user needs coverage reporting, then, he will have to define.

kemboijs-cli myapp fram=express db=mongo,mongoose test=mocha,chai --coverage

Or, nyc/any test runner coverage availability in test argv will show directly that coverage is required.

ronaldndirangu commented 5 years ago

Great work @ezrqnkemboi however I think that for handling the initialization of an app using a generator that follows predefined steps such as the yarn init script would be better for this as it would avoid many of the edge cases that might arise from the above-said approach.

ezkemboi commented 5 years ago

That is great feedback and will take consideration of that.

ezkemboi commented 5 years ago

@ronaldndirangu I might develop the first instance using the first method, I had proposed. This is not to say the idea, will not be implemented, but I will leave the issue open until it is resolved. I will create just a replica of this issue and work on it.

I am working on version 2, which will cover this issue and others that have arisen during the development process.

ezkemboi commented 4 years ago

@ronaldndirangu, can you have some time to check on pull request #40