A plugin to sync built assets to a Google Cloud Storage bucket.
Install the plugin with npm
npm install rollup-plugin-google-cloud-storage --save-dev
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)]
};