@cubesoft/nx-lambda-build
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

nx-lambda-build

Getting started

Prerequisite

This module is based on Nx, you will need to set up an Nx workspace before you can use nx-cdk.

npx create-nx-workspace

Installation

npm i -D @cubesoft/nx-lambda-build

Creating a nx-lambda-build project

nx g @cubesoft/nx-lambda-build:nx-lambda-build <name> [--dry-run]

Build a lambda handler

Run the command below to build your lambda handler and generate a package.json file with all used packages.

nx build <project> [--configuration <configuration name>] # Provide a specific build configuration

Project options

"targets": {
    "build": {
        "executor": "@cubesoft/nx-lambda-build:build",
        "options": {
            "target": "node16",
            "architecture": "arm64",
            "platform": "linux",
            "installModules": true
        }
    }
}

target: esbuild build target architecture: esbuild target architecture platform: npm install platform installModules: whether node_modules should be installed and bundled with the handler zip package

Add a new lambda handler (currently not working)

Run the command below to add a new lambda handler. This will automatically add the required entrypoint in the handlers.json file for you.

nx g @cubesoft/nx-lambda-build:handler <path> [--dry-run]

Readme

Keywords

none

Package Sidebar

Install

npm i @cubesoft/nx-lambda-build

Weekly Downloads

540

Version

2.0.0

License

none

Unpacked Size

27.3 kB

Total Files

32

Last publish

Collaborators

  • cubesoftorg