effortless-lambda
v0.1.2
Published
A TrackVia Integration generator
Downloads
3
Maintainers
Readme
Effortless Lambda
A generator to quickly create a modern development environment for an AWS Lambda function.
What Does it Do?
It generates a bare-bones ES6 Javascript project that provides helpful utilities to create, test, and publish a Node function. Instead of creating a new directory with all the boilerplate and configuring Babel, ESLint, and testing each and every time, you can have these things automatically configured for you. Take a look inside the template
folder to get an idea of what is provided.
It can also Webpack and zip your final bundle making it easy to simply upload the final file to AWS.
How Do I Get Started?
No need to install anything, just run:
npx effortless-lambda
It will ask you for four pieces of information:
- Name of the project
- Name of the author
- A description of your project (optional)
- What linting ruleset you'd like to use (StandardJS, Google, None)
Answer these questions, cd
into the newly created directory and open it up in your code editor.
How Do I Use It?
Any changes to the src/
folder are what will be considered part of your final project. You can also make changes to the testParameters.js
file at the root if you'd like to run your project locally (the script to do so is below) and pass your own parameters without accidentally wrapping them into your final product.
There's a couple pre-configured npm
scripts that will help speed some things up:
npm run start
: Builds yoursrc/
folder and runs your project with the parameters supplied intestParameters.js
.npm run build
: Runswebpack
on your project and outputs the contents to adist/
folder.npm run lint:configure
: Prompts the default ESLint configuration questions to resset/initialize your linting rules.npm run test
: Runs all of your Jest tests.npm run zip <NAME-OF-ARCHIVE>
: Zips your built project and outputs it as a.zip
file with the name you provided in this command in azipUpload/
folder at the root. If you don't pass a name at the time of the command, it will fall back to thename
property in yourpackage.json
.