1.1.0 • Published 6 years ago

gulp-awspublish-headers v1.1.0

Weekly downloads
47
License
BSD-3-Clause
Repository
github
Last release
6 years ago

gulp-awspublish-headers

A plugin for defining per-file headers for gulp-awspublish.

Usage

const awsheaders = require('gulp-awspublish-headers');

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

	return gulp.src('./public/**/*')
		.pipe(awsheaders({
			'path/to/**/*': {
				'Cache-Control': 'public, max-age=604800',
				'x-amz-meta-foo': 'bar',
			},
		}))
		.pipe(publisher.publish());
});

Files may match multiple paths in which case the headers will be merged with the later defined headers taking precedence.

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-headers --save

Dependencies

  • minimatch: a glob matcher in javascript
  • through2: A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise

License

BSD-3-Clause