Upload files to Google Cloud Storage with Gulp
npm install --save-dev gulp-gcloud-publish
First, you need to create your Google Cloud API credentials. Official Docs.
The plugin takes a configuration object with the following keys:
String: Name of the bucket where we want to upload the file
Boolean(optional): Let Google automatically gzip and mark metadata of your file. Regardless of this setting, already-gzipped files will have metadata properly set.
String: Full path to the Google Cloud API keyfile (docs)
String: Google Cloud Project ID (docs)
String: base path to use in the bucket, default to
Boolean(optional): If set to true, marks the uploaded file as public
Boolean(optional): Should be set to true for large files (>10Mb). Default is
Function(optional): Manipulates the final destination of the file in the bucket.
If you would like to
gzip the files, the plugin works best with gulp-gzip.
var gulp = ;var gcPub = ;var gzip = ; // optionalgulp;