gulp-awspublish-headers

Define per-file headers for gulp-awspublish.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gulp-awspublish-headers
1.1.06 years ago6 years agoMinified + gzip package size for gulp-awspublish-headers in KB

Readme

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