grunt-fastly
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "grunt-fastly", | ||
"description": "A Grunt plugin to purge cache from Fastly", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"homepage": "https://github.com/coen-hyde/grunt-fastly", | ||
@@ -6,0 +6,0 @@ "author": { |
# grunt-fastly | ||
> A Grunt plugin to purge cache from Fastly | ||
A Grunt plugin to purge cache from Fastly | ||
[![NPM](https://nodei.co/npm/grunt-fastly.png)](https://nodei.co/npm/grunt-fastly/) | ||
## Getting Started | ||
@@ -6,0 +8,0 @@ This plugin requires Grunt `~0.4.1` |
@@ -12,3 +12,4 @@ /* | ||
var fastly = require('fastly') | ||
, async = require('async'); | ||
, async = require('async') | ||
, url = require('url'); | ||
@@ -59,5 +60,7 @@ module.exports = function(grunt) { | ||
async.eachLimit(this.data.urls, options.concurrentPurges, function(url, next) { | ||
grunt.log.write('Purging "'+options.host+'/'+url+'"...'); | ||
fastly.purge(options.host, url, function(err) { | ||
async.eachLimit(this.data.urls, options.concurrentPurges, function(uriPath, next) { | ||
var uri = url.format({host: options.host, pathname: uriPath}).substr(2); | ||
grunt.log.write('Purging "'+uri+'"...'); | ||
fastly.purge(options.host, uriPath, function(err) { | ||
if (err) grunt.log.error(); | ||
@@ -64,0 +67,0 @@ else grunt.log.ok(); |
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
9610
156
117