simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
181 stars 31 forks source link
firebase nx

@simondotm/nx-firebase actions nx npm downloads

A plugin for Nx v16.8.1+ that integrates Firebase workflows in an Nx monorepo workspace.

See CHANGELOG for release notes.

Install Plugin

npm install @simondotm/nx-firebase --save-dev

Generate Firebase Application

nx g @simondotm/nx-firebase:app my-new-firebase-app [--directory=dir] [--project=proj]

Generate Firebase Function

nx g @simondotm/nx-firebase:function my-new-firebase-function --app=my-new-firebase-app [--directory=dir]

Build

nx build my-new-firebase-app

nx build my-new-firebase-function

Serve

nx serve my-new-firebase-app

Deploy

Firebase Application

nx deploy my-new-firebase-app [--only ...]

For initial deployment:

Note that you can also use the firebase CLI directly if you prefer:

Firebase Function

nx deploy my-new-firebase-function

Test

nx test my-new-firebase-app

nx test my-new-firebase-function

Lint

nx lint my-new-firebase-app

nx lint my-new-firebase-function

Sync Workspace

nx g @simondotm/nx-firebase:sync

Further Information

See the full plugin User Guide for more details.