packager API
Everything the package exports, by the path you import it from. Open an export for its signature and options.
@evolve-framework/packager
buildScripts, which runs the targets named by command-line flags, and the builds: buildDocker, buildLambda, buildAzureFunction and bundleTerraform
Functions
buildAzureFunctionBuild a zip archive to be deployed as an Azure Function This generates a package.json and copies the host.json file to the root.
import { buildAzureFunction } from "@evolve-framework/packager";function buildAzureFunction(options: AzureFunctionOptions): Promise<void>| Option | Type | Description |
|---|---|---|
srcDir | string | Holds |
outdir | string | Where the function app is assembled. |
archiveName? | string | Zips the function app to this path, leaving source maps out. |
external? | string[] | Packages left out of the bundle, because the runtime provides them. |
Returns Promise<void>
buildDockerBuild the dist files for the docker container.
import { buildDocker } from "@evolve-framework/packager";function buildDocker(options: DockerOptions): Promise<void>| Option | Type | Description |
|---|---|---|
entryPoint | string | The module the container starts. |
outdir | string | Where the bundled |
external? | string[] | Packages left out of the bundle, to be installed in the image instead. |
inject? | string[] | Modules imported ahead of the entry point, as esbuild's |
keepNames? | boolean | Keeps function and class names, for code that reads |
Returns Promise<void>
buildLambdaBuild a Lambda function and optionally create a zip archive of the output.
import { buildLambda } from "@evolve-framework/packager";function buildLambda(options: LambdaOptions): Promise<void>| Option | Type | Description |
|---|---|---|
entryPoints | string[] | One handler module per function; several share one bundle directory. |
outdir | string | Where the bundled |
external? | string[] | Packages left out of the bundle, because the runtime provides them. |
archiveName? | string | Zips the bundle to this path, leaving source maps out of the archive. |
sourcemapsDir? | string | Where source maps are moved to. Defaults to |
includeFiles? | string[] | Files copied as they are into the bundle directory and the archive. |
Returns Promise<void>
buildScriptsRuns the build targets named by command-line flags, in the order given: --lambda runs the target keyed lambda.
import { buildScripts } from "@evolve-framework/packager";function buildScripts(options: ScriptOptions): Promise<void>Returns Promise<void>
bundleTerraformCreate a zip archive of the given Terraform files
import { bundleTerraform } from "@evolve-framework/packager";function bundleTerraform({ archiveName, source }: BundleOptions): Promise<void>| Option | Type | Description |
|---|---|---|
archiveName | string | The zip to write. |
source? | string | The directory archived, as the root of the zip. Defaults to |
Returns Promise<void>

