Skip to content

miteshsondhi/gulp-cloudflare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

No longer maintained. Do let me know if anyone want this repo.

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •