gulp-awspublish-cloudfront

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i gulp-awspublish-cloudfront

Weekly Downloads

2

Version

1.0.0

License

BSD-3-Clause

Unpacked Size

4.6 kB

Total Files

4

Last publish

Collaborators

  • tmthrgd