Show / Hide Table of Contents

Interface ICommandHooks

Command hooks.

Namespace: Amazon.CDK.AWS.Lambda.Nodejs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICommandHooks
Syntax (vb)
Public Interface ICommandHooks
Remarks

These commands will run in the environment in which bundling occurs: inside the container for Docker bundling or on the host OS for local bundling.

Commands are chained with &&.

The following example (specified in TypeScript) copies a file from the input directory to the output directory to include it in the bundled asset:

afterBundling(inputDir: string, outputDir: string): string[]{
  return [`cp ${inputDir}/my-binary.node ${outputDir}`];
}

Synopsis

Methods

AfterBundling(string, string)

Returns commands to run after bundling.

BeforeBundling(string, string)

Returns commands to run before bundling.

BeforeInstall(string, string)

Returns commands to run before installing node modules.

Methods

AfterBundling(string, string)

Returns commands to run after bundling.

string[] AfterBundling(string inputDir, string outputDir)
Parameters
inputDir string
outputDir string
Returns

string[]

Remarks

Commands are chained with &&.

BeforeBundling(string, string)

Returns commands to run before bundling.

string[] BeforeBundling(string inputDir, string outputDir)
Parameters
inputDir string
outputDir string
Returns

string[]

Remarks

Commands are chained with &&.

BeforeInstall(string, string)

Returns commands to run before installing node modules.

string[] BeforeInstall(string inputDir, string outputDir)
Parameters
inputDir string
outputDir string
Returns

string[]

Remarks

This hook only runs when node modules are installed.

Commands are chained with &&.

Back to top Generated by DocFX