generator-aws-lambda ![Build Status](https://camo.githubusercontent.com/bd50f3b9e897fc587152d48dd41a976647966e4c0f5450fccadc272bd2e417fe/68747470733a2f2f7472617669732d63692e6f72672f53616d566572736368756572656e2f67656e657261746f722d6177732d6c616d6264612e7376673f6272616e63683d6d6173746572)
Scaffold out an AWS Lambda microservice with bragg.
Installation
$ npm install -g generator-aws-lambda
Usage
With Yeoman.
$ yo aws-lambda
License
MIT © Sam Verschueren
Scaffold out an AWS Lambda module.
License: MIT License
Scaffold out an AWS Lambda microservice with bragg.
$ npm install -g generator-aws-lambda
With Yeoman.
$ yo aws-lambda
MIT © Sam Verschueren
I couldn't add a list of strings in the package.json file with the template possibilities.
After running the generator and building the lambda, there are several issues which prevent npm build
to create a deployment package.
Following packages needs to be updated due to ava
:
typescript
@types/node
The test package has a typescript error as well.
Scaffold out a project with babel of this option was chosen.
If the question is answered positive, the aws-lambda-invoke
package should be added.
If the question is answered positive, everything should be added for easy test writing.
The zip task is not working properly anymore. Since npm@3, all the packages are deduplicated. This makes ignoring the devDependencies not really intelligent. Better would be to create a temp directory, copy all the js files + license + package.json and run npm install --production
. Zip everything inside that temp directory.
It would be nice if it was possible to provide a list of extra libraries that should be installed.
aws-sdk
is globally available and shouldn't zipped. The module is > 3 MB so this will reduce the size of the uploaded code.
For instance, when selecting dynongo
in the last question, the package.json
file looks like this.
"dependencies": {
"bragg": "^0.2.0",
"bragg-router": "^0.2.0",
"bragg-env": "^0.2.0",
"bragg-route-invoke": "^0.1.0",
,
"dynongo": "^0.6.0"
},
Just like the TypeScript project.
Drop support for nod 0.10
While I see that you're using the username as a convenience function to set the name and email address in the package.json, I don't think it should be mandatory; like if someone doesn't enter it offer the option to enter the name and email manually. In my case my github account is completely unrelated to the company I'm doing work for, so I have to hop into the package.json and change it manually negating the convenience factor anyways.
I know it's a minor quibble, but it almost stopped me from using your generator as I immediately had to pause and jump into the source code to see why this module I just downloaded wants to know details about me and what is it going to do with them.
Via one of several options:
The files property should not be used with globbing patterns.
{
"files": [
"index.js",
"util"
]
}
should include the index.js
file and all the files in the util
directory.
To keep the zip file as small as possible, all the LICENSE files or ignored and are not copied to the zip file. Is this ok to do or not? Probably this isn't and the licenses should be copied to the zip as well.
Scaffold out a project and tests with TypeScript.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.