@nx-extend/gcp-functions
TypeScript icon, indicating that this package has built-in type declarations

12.1.0 • Public • Published

@nx-extend/gcp-functions

@nx-extend/gcp-functions NPM package

Nx plugin to build and deploy your Google Cloud Functions.

Setup

Install

npm install -D @nx-extend/gcp-functions
nx g @nx-extend/gcp-functions:init

Usage

Deploy

Available options:

name type default description

Runner

This projects includes a runner to run all your functions, to generate the runner:

nx g @nx-extend/gcp-functions:init-runner <name>

This will generate a main.ts file like this:

import { bootstrapRunner } from '@nx-extend/gcp-functions/runner'

/* eslint-disable @nx/enforce-module-boundaries */
bootstrapRunner(new Map([
    ['nx function project name', import('path to main of of project')]
  ])
)

You can now add all your functions to the map, note: make sure that the nx function project name is the same name as known by Nx (name prop of that functions project.json). The runner uses the deploy target of that project.json to determine how to serve the function (http/pub sub/bucket event).

Readme

Keywords

none

Package Sidebar

Install

npm i @nx-extend/gcp-functions

Weekly Downloads

1,073

Version

12.1.0

License

MIT

Unpacked Size

90.3 kB

Total Files

65

Last publish

Collaborators

  • tripss