Skip to content

Commit

Permalink
docs(@whook/aws-lambda): improve the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nfroidure committed Mar 27, 2020
1 parent 55f2e0a commit cac0452
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions packages/whook-aws-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ You can easily test your lambda builds by adding `@whook/aws-lambda`
npm run whook -- testHTTPLambda --name getPing
```

## Deployment

We recommend using [Terraform](https://terraform.io) to deploy your
lambda functions.

There is a complete example on how to deploy your lambdas
[in this pull request](https://github.com/nfroidure/whook/pull/54).

[//]: # (::contents:end)

# API
Expand Down
6 changes: 3 additions & 3 deletions packages/whook-aws-lambda/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ async function buildFinalLambda(
await Promise.all([
ensureFileAsync({ log }, `${lambdaPath}/index.js`, contents, 'utf-8'),
mappings
? await ensureFileAsync(
? ensureFileAsync(
{ log },
`${lambdaPath}/index.js.map`,
mappings,
Expand Down Expand Up @@ -402,10 +402,10 @@ async function ensureFileAsync(
}
} catch (err) {
log('debug', 'Write new file:', path);
return writeFileAsync(path, content, encoding);
return await writeFileAsync(path, content, encoding);
}
log('debug', 'Write changed file:', path);
return writeFileAsync(path, content, encoding);
return await writeFileAsync(path, content, encoding);
}

// Cannot promisify mkdirp easily so doing it by hand
Expand Down

0 comments on commit cac0452

Please sign in to comment.