This article covers using the Plop framework to create a basic CLI which can auto generate our scaffolded serverless code using the clean code lightweight approach; with code examples written in TypeScript and the AWS CDK.
NOTE: This is a basic example of the CLI to show the templating approach with Plop - this is not production ready.
The article can be found here: https://blog.serverlessadvocate.com/using-plop-to-improve-our-serverless-developer-experience-22634147ebb1
Let's start by installing this local package as if it is a npm package:
- change directory into the advocate-cli folder
cd into advocate-cli
- Install the dependencies:
npm i
- build the CLI and link this in dev mode like a global package
npm run build && npm run link
To run the solution please look at the steps in the article linked above.
** The information and code provided are my own and I accept no responsibility on the use of the information. **