0.1.3 • Published 9 years ago
gulp-cloudflare v0.1.3
gulp-cloudflare
cloudflare plugin for gulp
Usage
First, install gulp-cloudflare
as a development dependency:
npm install --save-dev gulp-cloudflare
Then, add it to your gulpfile.js
:
var cloudflare = require("gulp-cloudflare");
gulp.task('purge-cdn-cache', function() {
var options = {
token : 'token',
email : 'email',
domain : 'domain'
};
cloudflare(options);
})
API
cloudflare(options)
options.token
Type: String
Required: true
options.email
Type: String
Required: true
options.domain
Type: String
Required: true
options.skip
Type: Boolean
Required: false
options.action
Type: String
Required: false
Default: fpurge_ts
Possible Values: fpurge_ts
, devmode
This package will only purge the cache from cloudflare. If you want to purge the cache in production mode. Then use https://www.npmjs.com/package/yargs.
gulp --type production
var cloudflare = require("gulp-cloudflare");
var argv = require('yargs').argv;
gulp.task('purge-cdn-cache', function() {
var options = {
token : 'token',
email : 'email',
domain : 'domain',
action : 'fpurge_ts',
skip : argv.type !== 'production'
};
cloudflare(options);
})