tmthrgd / gulp-awspublish-cloudfront

A plugin for invalidating a CloudFront cache for gulp-awspublish.

Home Page:https://www.npmjs.com/package/gulp-awspublish-cloudfront

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gulp-awspublish-cloudfront

A plugin to invalidate a CloudFront cache on publish for gulp-awspublish.

Usage

const awscloudfront = require('gulp-awspublish-cloudfront');

gulp.task('publish', function() {
	const publisher = awspublish.create(/*...*/);

	return gulp.src('./public/**/*')
		.pipe(publisher.publish())
		.pipe(awscloudfront('your-cloudfront-id'));
});

If any files have changed in the S3 bucket, an invalidation for the entire bucket (path: /*) will be created. gulp-awspublish-cloudfront can optionally take a first argument that provides the aws.CloudFront object to use.

Installation

This is a Node.js module available through the npm registry. It can be installed using the npm or yarn command line tools.

npm install gulp-awspublish-cloudfront --save

Dependencies

  • aws-sdk: AWS SDK for JavaScript
  • fancy-log: Log things, prefixed with a timestamp
  • through2: A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise

License

BSD-3-Clause

About

A plugin for invalidating a CloudFront cache for gulp-awspublish.

https://www.npmjs.com/package/gulp-awspublish-cloudfront

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 100.0%