gulp-awspublish-headers

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i gulp-awspublish-headers

Weekly Downloads

36

Version

1.1.0

License

BSD-3-Clause

Unpacked Size

4.41 kB

Total Files

4

Last publish

Collaborators

  • tmthrgd