Skip to content

jacksongross/rollup-plugin-google-cloud-storage

Repository files navigation

rollup-plugin-google-cloud-storage

A plugin to sync built assets to a Google Cloud Storage bucket.

Version License: MIT GitHub issues

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)]
};

About

Uploads build assets to a bucket on Google Cloud Storage

Resources

License

Stars

Watchers

Forks

Packages

No packages published