ICommandHooks

class aws_cdk.aws_lambda_nodejs.ICommandHooks(*args, **kwds)

Bases: typing_extensions.Protocol

Command hooks.

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 &&.

Example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
    # Copy a file from the input directory to the output directory
    # to include it in the bundled asset
    after_bundling(input_dir, string, output_dir, string)string[]return [f"cp {inputDir}/my-binary.node {outputDir}"]

Methods

after_bundling(input_dir, output_dir)

Returns commands to run after bundling.

Commands are chained with &&.

Parameters
  • input_dir (str) –

  • output_dir (str) –

Return type

List[str]

before_bundling(input_dir, output_dir)

Returns commands to run before bundling.

Commands are chained with &&.

Parameters
  • input_dir (str) –

  • output_dir (str) –

Return type

List[str]

before_install(input_dir, output_dir)

Returns commands to run before installing node modules.

This hook only runs when node modules are installed.

Commands are chained with &&.

Parameters
  • input_dir (str) –

  • output_dir (str) –

Return type

List[str]