1.0.5 • Published 3 years ago

sls-ts-codegen v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

AWS Lambda TypeScript Code Generator

This package provides a command-line tool to generate CRUD (Create, Read, Update, Delete) boilerplate code for AWS Lambda functions written in TypeScript. The generated code is based on the aws-nodejs-typescript template from the Serverless Framework.

Installation

npm i -D sls-ts-codegen

Usage

To generate the boilerplate code for a Lambda function, use the generate command followed by the function name:

npx sls-ts-codegen generate -f myFunction

By default, the generated code will be saved in a folder named after the function in the /src/functions directory. You can specify a different path using the -p or --path option:

npx sls-ts-codegen generate -f myFunction -p /path/to/myFunction

The generated code includes a handler.ts file that defines the Lambda function handler and a model.ts file that defines the data model. Both files are based on Handlebars templates, which you can customize by modifying the crud-template.hbs and model-template.hbs files in the templates directory.

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago