@nx-extend/gcp-storage
v11.1.0
Published
<a href="https://www.npmjs.com/package/@nx-extend/gcp-storage" rel="nofollow"> <img src="https://badgen.net/npm/v/@nx-extend/gcp-storage" alt="@nx-extend/gcp-storage NPM package"> </a>
Maintainers
Readme
@nx-extend/gcp-storage
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-storageUsage
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"
}
}
}