From 8db651107a0b41c013b3f1b394972b243482b8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Van=20der=20Auwermeulen=20Gr=C3=A9goire?= Date: Mon, 8 Oct 2018 05:24:04 +0800 Subject: [PATCH] Create README.md This is part off this change in serverless-webpack: elastic-coders/serverless-webpack#131 Explain how to work with the serverless-offline, serverless-webpack and serverless-dynamodb-local --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 12797614..7eca5280 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,18 @@ Options are: - `--function` or `-f` (required) is the name of the function to run - `--path` or `-p` (optional) is a JSON file path used as the function input event +### Using with serverless-offline and serverless-webpack plugin + + Run `serverless offline start`. In comparison with `serverless offline`, the `start` command will fire an `init` and a `end` lifecycle hook which is needed for serverless-offline and serverless-dynamodb-local to switch off both ressources. + + Add plugins to your `serverless.yml` file: + ```yaml + plugins: + - serverless-webpack + - serverless-dynamodb-local + - serverless-offline #serverless-offline needs to be last in the list + ``` + ### Bundle with webpack To just bundle and see the output result use: