gulp-awspublish-headers
v1.1.0
Published
Define per-file headers for gulp-awspublish.
Downloads
174
Maintainers
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