0.1.3 • Published 9 years ago

gulp-cloudflare v0.1.3

Weekly downloads
71
License
MIT
Repository
github
Last release
9 years ago

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);
})

License

MIT License

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago