npm.io
0.0.3 • Published 10 years ago

gulp-keycdn

Licence
MIT
Version
0.0.3
Deps
2
Vulns
0
Weekly
0
Stars
5

gulp-keycdn

Gulp plugin to interact with the KeyCDN API.

Usage

var gulp = require('gulp'),
    keycdn = require('gulp-keycdn');

Purge Zone Cache

gulp.task('purgeZone', function() {
    var options = {
		apiKey  : 'your_api_key',
		zoneId  : 'zone_id',
		method : 'get'
	};

    keycdn(options, {});
});
Purge Selected URLs
gulp.task('purgeURL', function() {
    var options = {
        apiKey  : 'your_api_key',
		zoneId  : 'zone_id',
		method : 'del'
	};

    var files = {
        urls: [ 'demo-1.kxcdn.com/lorem.css', 'demo-1.kxcdn.com/lorem.jpg' ]
    };

    keycdn(options, files);
});

For more details visit https://www.keycdn.com

Keywords