2.0.1 • Published 8 years ago
@hughescr/generator-aws-lambda v2.0.1
Overview
This is a scaffold for the basic structure of a NodeJS AWS lambda function, which can be written in ES6 with Flow annotations, and will get transpiled down to something Lambda is happy with.
Use
Install yo and the generator (probably globally), create a directory for your project, then run the generator in that directory
npm -g install yo @hughescr/generator-aws-lambda
mkdir sample-project
cd sample-project
yo @hughescr/aws-lambdaAnswer the questions for the config you want, then sit back and it'll build and set up:
- Main source stub
- Unit test stubs
- ESLint
- Grunt, including
linttarget which runs linttesttarget which runs tests & coverage report\packagetarget which creates a ZIP file you can upload to AWSdeploytarget which will update a lambda on AWS with the codeinvoketarget which will test-invoke your lambda locally passing it an event you can specify
- NPM package.json, including
postversionscript which handles git updating of version ticking