gulp-awspublish-cloudfront
v1.0.0
Published
A plugin to invalidate a CloudFront cache on publish for gulp-awspublish.
Downloads
3
Maintainers
Readme
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