8000 Add serverless-plugin-simulate support by LadnovSasha · Pull Request #1 · balanced-mt/serverless-plugin-typescript · GitHub
[go: up one dir, main page]

Skip to content

Add serverless-plugin-simulate support #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,21 @@ plugin as follows:

Run `serverless offline start`.

#### serverless-plugin-simulate

Add the plugins to your `serverless.yml` file and make sure that `serverless-plugin-typescript`
precedes `serverless-plugin-simulate` as the order is important:
```yaml
plugins:
...
- serverless-plugin-typescript
...
- serverless-simulate-simulate
...
```

`serverless-plugin-typescript` attaches to `simulate lambda` and `simulate apigateway` events

#### Other useful options

You can reduce the clutter generated by `serverless-offline` with `--dontPrintOutput` and
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export class TypeScriptPlugin {
await this.compileTs()
this.watchAll()
},
'before:simulate:lambda:start': this.compileTs.bind(this),
'before:simulate:apigateway:initialize': this.compileTs.bind(this),
'before:package:createDeploymentArtifacts': this.compileTs.bind(this),
'after:package:createDeploymentArtifacts': this.cleanup.bind(this),
'before:deploy:function:packageFunction': this.compileTs.bind(this),
Expand Down
0