From 10e773e214819d2cd3befc1b637aad44c4be2796 Mon Sep 17 00:00:00 2001 From: Filip Pyrek Date: Wed, 18 Mar 2020 00:06:09 +0100 Subject: [PATCH] Update Readme --- README.md | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8b11eb7..d53ee25 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,56 @@ -[![NPM](https://nodei.co/npm/serverless-s3-remover.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/serverless-s3-remover/) -[![NPM](https://nodei.co/npm-dl/serverless-s3-remover.png?height=2)](https://nodei.co/npm/serverless-s3-remover/) -# serverless-s3-remover -plugin for serverless to make buckets empty before remove +# @purple/serverless-s3-remover + +Plugin for serverless to make buckets empty before remove. + +## Original project + +[Original project](https://github.com/sinofseven/serverless-s3-remover) is not +maintained anymore, so we published this version under `@purple` organisation. + +Main difference between [`serverless-s3-remover`](https://www.npmjs.com/package/serverless-s3-remover) and [`@purple/serverless-s3-remover`](https://www.npmjs.com/package/@purple/serverless-s3-remover) +is ability to empty buckets with enabled versioning. + +[`serverless-s3-remover`](https://www.npmjs.com/package/serverless-s3-remover) is not able to empty buckets with enabled versioning. # Usage + Run next command. + ```bash -$ npm install serverless-s3-remover +$ npm install @purple/serverless-s3-remover ``` Add to your serverless.yml + ```yaml plugins: - - serverless-s3-remover + - "@purple/serverless-s3-remover" custom: remover: - buckets: - - my-bucket-1 - - my-bucket-2 + buckets: + - my-bucket-1 + - my-bucket-2 ``` You can specify any number of `bucket`s that you want. Now you can make all buckets empty by running: + ```bash $ sls s3remove ``` # When removing -When removing serverless stack, this plugin automatically make buckets empty before removing stack. + +When removing serverless stack, this plugin automatically make buckets empty before removing stack. + ```sh $ sls remove ``` # Using Prompt + You can use prompt before deleting bucket. ```yaml @@ -49,6 +65,7 @@ custom: ![terminal.png](https://user-images.githubusercontent.com/57114/31264298-0896f1ec-aaa3-11e7-9a8e-86e3c3f34e23.png) # Populating the configuration object before using it + ```yaml custom: boolean: @@ -58,4 +75,4 @@ custom: prompt: ${self:custom.boolean.${opt:s3-remover-prompt, 'true'}} ``` - I can use the command line argument ```--s3-remover-prompt false``` to disable the prompt feature. \ No newline at end of file +I can use the command line argument `--s3-remover-prompt false` to disable the prompt feature.