@rinku12/api-file-maker
v1.0.13
Published
If your typescript project follows this structure as follow project-root/src/api/api-name/api-name.controller.ts project-root/src/api/api-name/api-name.entity.ts project-root/src/api/api-name/api-name.resolver.ts project-root/src/api/api-name/api-name
Downloads
6
Readme
API Files Creator for typescript project
Requirement
If your typescript project follows this structure as follow project-root/src/api/api-name/api-name.controller.ts project-root/src/api/api-name/api-name.entity.ts project-root/src/api/api-name/api-name.resolver.ts project-root/src/api/api-name/api-name.service.ts
You can use this package to automate the file creation task.
Note
This package assume you are using express, typeorm, routing-controller and typegraphql with apollo-express to build your api. The GraphQL is not mandatory so you can skip the files that get created for graphql related part.
Usage
Install as dev dependency
npm i -D @rinku12/api-file-maker
or yarn add -D @rinku12/api-file-maker
Add Following to your package.json
"create-file": " node_modules/@rinku12/api-file-maker"
Now Run following command on terminal at project root directory
npm run create-file [file-name]
OR
Install Globally
npm i -g @rinku12/api-file-maker
then
run following command at project directory in terminal
create-file [api-name]
You will be prompted with a question of withGraphql? Answer Yes or No depending upon your project.