https://github.com/steelkiwi/grunt-cloudfront-invalidation
A Grunt task for cloudfront invalidation with ability of tracking invalidation progress
https://github.com/steelkiwi/grunt-cloudfront-invalidation
Last synced: 5 months ago
JSON representation
A Grunt task for cloudfront invalidation with ability of tracking invalidation progress
- Host: GitHub
- URL: https://github.com/steelkiwi/grunt-cloudfront-invalidation
- Owner: steelkiwi
- Created: 2016-06-29T09:53:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-29T10:28:40.000Z (over 9 years ago)
- Last Synced: 2025-01-25T23:49:30.704Z (9 months ago)
- Language: CoffeeScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grunt-cloudfront-invalidation
> A Grunt task for cloudfront invalidation with ability of tracking invalidation progress
## Getting Started
This plugin requires Grunt `~0.4.5`If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
```shell
npm install grunt-cloudfront-invalidation --save-dev
```Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-cloudfront-invalidation');
```## The "cloudfront_invalidation" task
### Overview
In your project's Gruntfile, add a section named `cloudfront_invalidation` to the data object passed into `grunt.initConfig()`.```js
grunt.initConfig({
cloudfront_invalidation: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
```### Options
#### options.credentials
Type: `Object`
Required: trueCredentials for your cloudfront cloudfront distribution.
Should contain fields:
- accessKeyId
- secretAccessKey
- distributionId#### options.invalidations
Type: `Array`
Required: trueOnly target-specific option. List of files that should be invalidated.
#### options.invalidationCheckInterval
Type: `Number`
Required: false
Default: 10000Timeout is milliseconds to check the invalidation status
#### options.onInvalidationComplete
Type: `Function`
Required: falseCallback called when invalidation is successfully finished.
*Note!* Not specifying this option tells task not to track invalidation status and finish right after it was created.#### options.onError
Type: `Function`
Required: falseCallback called when error during invalidation creation or getting occures
#### options.onSuccess
Type: `Function`
Required: falseCallback called when invalidation is created