Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 1.75 KB

README.md

File metadata and controls

63 lines (49 loc) · 1.75 KB

@nx-extend/firebase-hosting

@nx-extend/firebase-hosting NPM package

Nx plugin for deploy your app to Firebase Hosting.

Setup

Install

npm install -D @nx-extend/firebase-hosting
nx g @nx-extend/firebase-hosting:add

This will add the following to the target:

{
  ...other targets
  "deploy": {
    "executor": "@nx-extend/firebase-hosting:deploy",
    "options": {
      "site": "<site provided in setup>"
    }
  }
}

And create a .firebase.json file if it does not exist already, if it exists it will add this target to the hosting section:

{
  ...other firebase config
  "hosting": [
    {
      "target": "<provided site name>",
      "public": "<target dist directory>",
      "ignore": [
        "firebase.json",
        "**/.*",
        "**/node_modules/**"
      ]
    }
  ]
}

Usage

Deploy

Available options:

name type default description
--site string null Specify the site to deploy from the .firebase.json
--project string Firebase Project to deploy to
--identifier string Name of the hosting project in Firebase (if not defined --site is used by the firebase CLI