Skip to content

Latest commit

 

History

History
73 lines (55 loc) · 1.67 KB

File metadata and controls

73 lines (55 loc) · 1.67 KB

@nx-extend/gcp-storage

@nx-extend/gcp-storage NPM package

Nx plugin to deploy your app to Cloud Storage.

Features

  • Upload files to Google Cloud Storage buckets
  • Optional gzip compression for uploaded files
  • Configurable gzip extensions
  • Ideal for static site hosting

Setup

Install

npm install -D @nx-extend/gcp-storage

Usage

Upload

Upload files to a Cloud Storage bucket:

nx upload <project-name>

Available Options

Name Type Default Description
bucket string - What bucket to upload to
directory string - Directory to upload
gzip boolean false Use gzip when uploading
gzipExtensions string - File extensions to gzip (comma-separated)

Examples

Basic Upload

{
  "upload": {
    "executor": "@nx-extend/gcp-storage:upload",
    "options": {
      "bucket": "my-static-site",
      "directory": "dist/apps/my-app"
    }
  }
}

Upload with Gzip Compression

{
  "upload": {
    "executor": "@nx-extend/gcp-storage:upload",
    "options": {
      "bucket": "my-static-site",
      "directory": "dist/apps/my-app",
      "gzip": true,
      "gzipExtensions": "html,css,js,json,svg"
    }
  }
}