0.5.3 • Published 8 months ago

@nxicy/node-lambda v0.5.3

Weekly downloads
-
License
-
Repository
github
Last release
8 months ago

@nxicy/node-lambda

npm nx support

The Node-Lambda Plugin contains generators and executors to simplify the creation and management of applications and handlers specifically designed for AWS Lambda deployment.

Overview

Setting up Node-Lambda

To add the Node-Lambda plugin to an existing workspace, run the following:

npm i @nxicy/node-lambda --save-dev

Creating Applications

You can add a new application with the following:

nx g @nxicy/node-lambda:application my-node-lambda-app

Creating Handlers

You can add a new handler to application with the following:

nx g @nxicy/node-lambda:handler --project my-node-lambda-app --name my-node-lambda-handler

Using Node-Lambda

Testing Handlers

You can run unit tests with:

nx run my-node-lambda-app:test

Building Handlers

Node-lambda handlers can be built with:

nx run my-node-lambda-app:build-my-node-lambda 

Packaging Handlers

Build and package a handler into a zip for deployment using:

nx run my-node-lambda-app:package-my-node-lambda 

Executors

package Builds and packages a handler

Generators

application Create a node-lambda application

handler Create a node-lambda handler

@nxicy/node-lambda:package

Builds and packages a handler to be deployed to as an AWS lambda Options can be configured in project.json when defining the executor, or when invoking it.

Options

buildTarget required string The target to run to build you the app.

buildTargetOptions object Default:{} Additional options to pass into the build target.

zipFileOutputPath string The path of the zip file

@nxicy/node-lambda:application

Node-lambda Application Options Schema

Usage

nx g @nxicy/node-lambda:application ...

or

nx g @nxicy/node-lambda:app ...

Options

name required string The name of the application

directory string The directory of the new application.

skipFormat boolean Default: false Skip formatting files

linter string Default: eslint Accepted values: eslint The tool to use for running lint checks.

unitTestRunner string Default: jest Accepted values: jest,none Test runner to use for unit tests.

tags string Add tags to the application (used for linting).

setParserOptionsProject boolean Default: false Whether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.

bundler string Default: esbuild Accepted values: esbuild,webpack Bundler which is used to package the handler

@nxicy/node-lambda:handler

Node-lambda Handler Options Schema

Usage

nx g @nxicy/node-lambda:handler ...

or

nx g @nxicy/node-lambda:hdlr ...

Options

name required string The name of the handler

project required string Then project name the handler will be added to

bundler string Default: esbuild Accepted values: esbuild,webpack Bundler which is used to package the handler

0.5.3

8 months ago

0.5.2

8 months ago

0.5.1

8 months ago

0.5.0

8 months ago

0.4.6

9 months ago

0.4.4

9 months ago

0.4.3

9 months ago

0.4.2

9 months ago

0.4.1

9 months ago

0.4.0

9 months ago

0.3.2

9 months ago

0.2.2

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.0

10 months ago

16.5.2

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago