2.0.0 • Published 1 year ago

plaid-bacchus v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

plaid-bacchus

plaid-bacchus is a command-line interface tool that generates templated files for creating API routes and utility files for those routes. This package provides a convenient way to quickly create new API routes and their supporting files, saving you time and effort.

Installation

You can install plaid-bacchus using :

Yarn:

yarn add plaid-bacchus

Npm:

npm -i plaid-bacchus

Configuration file

plaid-bacchus requires a configuration file named pb.config.json to be present in the project directory. This file can be generated by running npx plaid-bacchus --init, or it can be created manually with the following keys:

  • apiPath: The path where the generated API routes will be stored.
  • apiUtilsPath: The path where the generated utility files will be stored.

Usage

plaid-bacchus provides two commands to generate templated files for API routes and utility files:

Generate API route

The npx plaid-bacchus api:create command is used to create a new API route with templated files. To create a new API route, run the following command:

npx plaid-bacchus apu:create --dirName ${name/of/your/route/:routeId}

Or if you would like to auto-generate also utils function for network methods you can add to the above

--methods get post patch delete

The --dirName option specifies the name of the route and the --methods option specifies the HTTP methods that the route will handle. The HTTP methods should be specified as a comma-separated string of values (e.g., "get,post").

Contributing

If you find any bugs or issues, please open an issue on the GitHub repository. Pull requests are welcome.

License

This package is released under the MIT License.

2.0.0

1 year ago

2.0.0-beta.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago