Gulp plugin to upload files to minio S3
- Install the plugin as development dependency
npm i -D gulp-minio-s3
- Use it in your
gulpfile.js
as follow
const { src, task } = require('gulp');
const minioS3 = require('gulp-minio-s3');
//Minio Configurations
const minioConfig = {
endPoint: END_POINT_HERE,
port: 9000,
useSSL: false,
accessKey: YOUR_ACCESS_KEY,
secretKey: YOUR_SECRET_KEY
};
// S3 Bucket
const bucketName = 'my-bucker';
task('upload', () => {
return src('./src/**').pipe(minioS3(bucketName, minioConfig));
});
task('upload-with-prefix', () => {
return src('./src/*.css').pipe(minioS3(bucketName, minioConfig, 'css'));
});
type: String
The bucket that the files will be uploaded to. Your must create the bucket beforehand. If the bucket does not exists, the plugin will throw an Error.
type: Object
Minio Configurations. Refer to the minio documeantion or the Minio JavaScript SDK for more details.
type: Sring
Optional param to upload files with prefix (folder) to minio