<commit_before># grunt-cloudfront

Grunt task for invalidating cache on Amazon AWS CloudFront with the official AWS SDK for node.js.

## Get Started

Install this grunt plugin next to your project's grunt.js gruntfile with: `npm install grunt-cloudfront --save-dev`

Then add this line to your project's `Gruntfile.js` gruntfile:

```javascript
grunt.loadNpmTasks('grunt-cloudfront');
```

## Usage

```javascript
// Project configuration.
grunt.initConfig({
  cloudfront: {
    options: {
      region:'us-east-1', // your AWS region
      distributionId:"YOUR_DISTRIBUTION_ID", // DistributionID where files are stored
      credentials:grunt.file.readJSON('path/to/aws/credentials.json'), // !!Load them from a gitignored file
      listInvalidations:true, // if you want to see the status of invalidations
      listDistributions:false, // if you want to see your distributions list in the console
      version:"1.0", // if you want to invalidate a specific version (file-1.0.js)
    },
    dev: {
      options: {
        distributionId: '** DEV KEY **'
      },
      CallerReference: Date.now().toString(),
      Paths: {
        Quantity: 1,
        Items: [ '/index.html' ]
      }
    live: {
      options: {
        distributionId: '** LIVE KEY **'
      },
      CallerReference: Date.now().toString(),
      Paths: {
        Quantity: 1,
        Items: [ '/index.html' ]
      }
    }
  }
});
```

## Release History
* March 10, 2014 - __0.2.0__ Add multi task option configuration (thanks @steve8708)
* February 27, 2014 - __0.1.1__ Fix dependencies
* May 14, 2013 - __0.1.0__ First release

## License
[<NAME>](http://twitter.com/flrent)  
Licensed under the MIT license.  
Copyright (c) 2013 - [http://www.payrollhero.com](PayrollHero.com)<commit_msg>Update README.md with description of credentials<commit_after># grunt-cloudfront

Grunt task for invalidating cache on Amazon AWS CloudFront with the official AWS SDK for node.js.

## Get Started

Install this grunt plugin next to your project's grunt.js gruntfile with: `npm install grunt-cloudfront --save-dev`

Then add this line to your project's `Gruntfile.js` gruntfile:

```javascript
grunt.loadNpmTasks('grunt-cloudfront');
```

## Usage

```javascript
// Project configuration.
grunt.initConfig({
  cloudfront: {
    options: {
      region:'us-east-1', // your AWS region
      distributionId:"YOUR_DISTRIBUTION_ID", // DistributionID where files are stored
      credentials:grunt.file.readJSON('path/to/aws/credentials.json'), // !!Load them from a gitignored file
      listInvalidations:true, // if you want to see the status of invalidations
      listDistributions:false, // if you want to see your distributions list in the console
      version:"1.0", // if you want to invalidate a specific version (file-1.0.js)
    },
    dev: {
      options: {
        distributionId: '** DEV KEY **'
      },
      CallerReference: Date.now().toString(),
      Paths: {
        Quantity: 1,
        Items: [ '/index.html' ]
      }
    live: {
      options: {
        distributionId: '** LIVE KEY **'
      },
      CallerReference: Date.now().toString(),
      Paths: {
        Quantity: 1,
        Items: [ '/index.html' ]
      }
    }
  }
});
```

### Credentials file
The credential file should look like this:

```json
{
  "accessKeyId": "ACCESS_KEY",
  "secretAccessKey": "SECRET_ACCESS_KEY"
}
```

## Release History
* March 10, 2014 - __0.2.0__ Add multi task option configuration (thanks @steve8708)
* February 27, 2014 - __0.1.1__ Fix dependencies
* May 14, 2013 - __0.1.0__ First release

## License
[<NAME>](http://twitter.com/flrent)  
Licensed under the MIT license.  
Copyright (c) 2013 - [http://www.payrollhero.com](PayrollHero.com)
{'fraction_non_alphanumeric': 0.1266434129326536, 'fraction_numerical': 0.022538234504963776, 'mean_word_length': 2.9786552828175026, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '275041', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1143, 'n_words': 342}