You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(serverless-offline): add support for serverless-offline plugin (#71)
* feat(serverless-offline): add support for serverless-offline plugin
Use serverless-offline hooks for integration. Add new `iopipe clean` command as it is useful with
offline. Update docs.
fix#70
Copy file name to clipboardExpand all lines: readme.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,10 @@ You're set! The plugin will run during an `sls deploy` or during `sls invoke loc
48
48
Check out an [example here](https://github.com/iopipe/serverless-plugin-iopipe/blob/master/example/serverless.yml).
49
49
50
50
# How Does it Work?
51
-
`serverless-plugin-iopipe`outputs a file that imports and wraps the function handlers defined in `serverless.yml` with IOpipe so you don't have to. It allows you to deploy and upgrade multiple functions simultaneously.
51
+
`serverless-plugin-iopipe`outputs files that import and wrap the function handlers defined in `serverless.yml` with IOpipe so you don't have to. It allows you to deploy and upgrade multiple functions simultaneously.
52
+
53
+
# Commands
54
+
- `sls iopipe clean`This command cleans up your project folder of extraneous `*-iopipe.js` files if needed. This can be useful when using the [serverless-offline](https://github.com/dherault/serverless-offline) plugin.
52
55
53
56
# Options
54
57
Beyond the required $IOPIPE_TOKEN environment variable, some options can be set [in the "custom" config](https://serverless.com/framework/docs/providers/aws/guide/plugins#installing-plugins) in `serverless.yml`. [See Example](https://github.com/iopipe/serverless-plugin-iopipe/blob/master/example/serverless.yml)
@@ -85,8 +88,10 @@ By default, the plugin sends _anonymized_, non-identifying usage statistics to G
85
88
- serverless-plugin-iopipe
86
89
- serverless-webpack
87
90
```
91
+
- Does this work with [serverless-offline](https://github.com/dherault/serverless-offline)?
92
+
- Yes, list `serverless-plugin-iopipe` first before any other plugins in `serverless.yml`.
88
93
- Can I use IOpipe plugins?
89
-
- Yes, you can specify iopipe plugins through your [package.json file, or an iopipe.rc file](https://github.com/iopipe/iopipe-js-core#packagejson-configuration). You will have to make sure those plugins are installed into node_modules.
94
+
- Yes, you can specify iopipe plugins through your [package.json file, or an iopipe.rc file](https://github.com/iopipe/iopipe-js-core#packagejson-configuration). Ensure those plugins are installed into your node_modules folder (yarn or npm).
90
95
91
96
## Known Issues
92
97
- If you have lambda functions that are already wrapped by iopipe via code, you may experience unexpected results. Remove the iopipe wrapping code from those handlers.
0 commit comments