gulp-s3-publish
s3 plugin for gulp
Info
This plugin started as a fork of gulp-s3.
Recently updated for Gulp 4 and added support for cleaning orphan files from an S3 bucket. Plugin API has changed since the 2.x release.
Please open an issue for feature requests.
Usage
First, install gulp-s3-publish
and aws-sdk
as a development dependency:
npm install --save-dev gulp-s3-publish aws-sdk
Then, use it in your Gulpfile.js
:
const upload clean = ;const S3 = ; const client = ; const uploadOpts = bucket: 'my-s3-bucket' // uploadPath: 's3/upload/path', // delay: 0, // maxConcurrency: 1, putObjectParams: ACL: 'public-read' // dryRun: false,; const cleanOpts = bucket: 'my-s3-bucket' // uploadPath: 's3/upload/path' // whitelist: [ // { type: 'key', path: 'keep-this-file.txt' }, // { type: 'keyPrefix', path: 'keep-this-path' }, // ], // dryRun: false,; // Upload files to S3// and clean orphaned filesgulp;