rollup-plugin-google-cloud-storage
v0.0.2
Published
Uploads build assets to a bucket on Google Cloud Storage
Downloads
71,848
Maintainers
Readme
rollup-plugin-google-cloud-storage
A plugin to sync built assets to a Google Cloud Storage bucket.
Installation
Install the plugin with npm
npm install rollup-plugin-google-cloud-storage --save-dev
Basic example
An example rollup.config.js:
import GoogleCloudStorage from 'rollup-plugin-google-cloud-storage';
const options {
directory: "some-directory" // directory to upload from, default `"dist"`
bucketName: "my-bucket", // name of bucket in GCP, required
serviceKeyJson: "{...}", // JSON string of service account key, required
concurrency: 1, // number of files to upload at a time, default `5`
skipIfExists: false // skips uploading file if already present in the destination bucket, default `true`
};
export default {
input: 'src/main.js',
output: {
file: 'bundle.js',
format: 'cjs'
},
plugins: [GoogleCloudStorage(options)]
};