Comparing version 0.4.2 to 0.5.0
@@ -30,3 +30,4 @@ | ||
] | ||
} | ||
}, | ||
invalidate: {} | ||
} | ||
@@ -33,0 +34,0 @@ }); |
{ | ||
"name": "grunt-aws", | ||
"description": "A Grunt interface into the Amazon Node.JS SDK", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"homepage": "https://github.com/jpillora/grunt-aws", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -5,2 +5,4 @@ # grunt-aws | ||
[![NPM version](https://nodei.co/npm/grunt-aws.png?compact=true)](https://npmjs.org/package/grunt-aws) | ||
## Getting Started | ||
@@ -191,3 +193,3 @@ This plugin requires Grunt `0.4.x` | ||
Define a charset to set on your ContentType. Ie. `utf-8` | ||
Add a charset to your `Content-Type`. For example: `utf-8`. | ||
@@ -453,6 +455,10 @@ #### `mime` (Object) | ||
distributionId: '...', | ||
invalidations: [ | ||
'/index.html', | ||
'/pages/whatever.html' | ||
] | ||
}, | ||
html: { | ||
options: { | ||
invalidations: [ | ||
'/index.html', | ||
'/pages/whatever.html' | ||
] | ||
} | ||
} | ||
@@ -459,0 +465,0 @@ } |
@@ -14,3 +14,3 @@ var AWS = require("aws-sdk"), | ||
//cloudfront task | ||
grunt.registerTask("cloudfront", DESC, function() { | ||
grunt.registerMultiTask("cloudfront", DESC, function() { | ||
@@ -17,0 +17,0 @@ //get options |
@@ -127,2 +127,15 @@ var AWS = require("aws-sdk"), | ||
baseObject.CacheControl = "max-age="+baseObject.CacheControl+", public"; | ||
else if (typeof baseObject.CacheControl === 'object') { | ||
var val = baseObject.CacheControl, | ||
maxage = val.MaxAge || null, | ||
swr = val.StaleWhileRevalidate || null; | ||
if (!maxage) { | ||
grunt.fail.warn("max_age is required for Cache-Control header"); | ||
} | ||
if (swr) { | ||
baseObject.CacheControl = "max-age="+maxage+", stale-while-revalidate="+swr+", public"; | ||
} else { | ||
baseObject.CacheControl = "max-age="+maxage+", public"; | ||
} | ||
} | ||
@@ -129,0 +142,0 @@ if(baseObject.Expires instanceof Date) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33877
603
517