Skip to content

Commit

Permalink
fix(lambda-nodejs): invalid sample in documentation (#12404)
Browse files Browse the repository at this point in the history
Otherwise it is highly confusing or / and even wrong


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mmuller88 authored Feb 23, 2021
1 parent 296a10d commit 520c263
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/@aws-cdk/aws-lambda-nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,17 @@ It is possible to run additional commands by specifying the `commandHooks` prop:

```ts
new lambda.NodejsFunction(this, 'my-handler-with-commands', {
commandHooks: {
// Copy a file so that it will be included in the bundled asset
afterBundling(inputDir: string, outputDir: string): string[] {
return [`cp ${inputDir}/my-binary.node ${outputDir}`];
bundling: {
commandHooks: {
// Copy a file so that it will be included in the bundled asset
afterBundling(inputDir: string, outputDir: string): string[] {
return [`cp ${inputDir}/my-binary.node ${outputDir}`];
}
// ...
}
// ...
}

});
```

Expand Down

0 comments on commit 520c263

Please sign in to comment.