Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.
/ gulp-fastly Public archive

Helps with common deploy tasks with Fastly

Notifications You must be signed in to change notification settings

sjlu/gulp-fastly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-fastly

Helps with common deploy tasks with Fastly.

Usage

npm install gulp-fastly --save

Purging

Especially useful for if you have a static site or need to purge things per deploy. Currently only allows full purges and not specific ones.

var Fastly = require('fastly')
gulp.task('deploy', function () {
  var fastly = new Fastly({
    apiKey: '',
    serviceId: ''
  })

  gulp.src('*')
    .pipe(fastly.purge())
})

Upload VCLs

This allows you to upload a new Fastly version with a current VCL file. Note that this will only upload the VCL if the md5 hash of the given VCL file is different than what is already activated.

var Fastly = require('fastly')
gulp.task('deploy', function () {
  var fastly = new Fastly({
    apiKey: '',
    serviceId: ''
  })

  return gulp.src('./fastly.vcl')
    .pipe(fastly.deployVcl())

License

MIT

About

Helps with common deploy tasks with Fastly

Resources

Stars

Watchers

Forks

Packages

No packages published