rollup-plugin-google-cloud-storage
Version:
Uploads build assets to a bucket on Google Cloud Storage
39 lines (28 loc) • 1.23 kB
Markdown
//img.shields.io/npm/v/rollup-plugin-google-cloud-storage) [](#) [](https://github.com/jacksongross/rollup-plugin-google-cloud-storage/issues)
Install the plugin with npm
```bash
npm install rollup-plugin-google-cloud-storage --save-dev
```
An example rollup.config.js:
```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)]
};
```
A plugin to sync built assets to a Google Cloud Storage bucket.
![Version](https: