Skip to content

Commit

Permalink
improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
maruware committed Dec 25, 2019
1 parent 70f8285 commit 76790fc
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ yarn add -D cfs3-publish

## Usage

* S3 and CloudFront
* S3 and CloudFront (using ENV)

```js
const { deployAndInvalidate } = require('cfs3-publish')
Expand All @@ -40,6 +40,35 @@ deployAndInvalidate(
)
```

* S3 and CloudFront (setting Access Key)

```js
const { deployAndInvalidate } = require('cfs3-publish')
// or import { deployAndInvalidate } from 'cfs3-publish' /* TypeScript */

deployAndInvalidate(
{
pattern: 'dist/**',
config: {
accessKeyId: 'YOUR_KEY',
secretAccessKey: 'YOUR_SECRET'
},
params: {
Bucket: bucket
}
},
{
distributionId,
config: {
accessKeyId: 'YOUR_KEY',
secretAccessKey: 'YOUR_SECRET'
},
paths: ['/*'],
wait: true
}
)
```

* S3

```js
Expand Down

0 comments on commit 76790fc

Please sign in to comment.