From e17e4e44cf1980dbe3a6f8d34afcdc02778f7d72 Mon Sep 17 00:00:00 2001 From: Jon Sharratt Date: Sat, 24 Sep 2016 10:55:59 +0100 Subject: [PATCH] update readme for package plugin about globs --- lib/plugins/package/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/plugins/package/README.md b/lib/plugins/package/README.md index 259889fb0..3c092b3dd 100644 --- a/lib/plugins/package/README.md +++ b/lib/plugins/package/README.md @@ -9,8 +9,17 @@ This plugin creates a deployment package on a per service basis (it will zip up It will zip the whole service directory. The artifact will be stored in the `.serverless` directory which will be created upon zipping the service. The resulting path to the artifact will be appended to the `service.package.artifact` property. -The services `include` and `exclude` arrays are considered during zipping. At first the `exclude` will be applied. After -that the `include` will be applied to ensure that previously excluded files and folders can be included again. +Services can use `exclude` as an array. The array should be a series of +globs to be considered for exclusion. + +For example in serverless.yaml: + +``` yaml +package: + exclude: + - "test/**" + - "**/spec.js" +``` Serverless will automatically exclude `.git`, `.gitignore`, `serverless.yml`, and `.DS_Store`.