0.0.2 • Published 3 years ago

firebase-config-type-definition v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

firebase-config-type-definition

Let's typecheck of firebase config.

💪Motivation

I didn't firebase config checker.

🔧 How to use

Try in CodeSandbox

https://codesandbox.io/embed/zealous-http-2dbzv?fontsize=14&hidenavigation=1&theme=dark

Try in your env

Copy your firebase config to ts file. And use this library's type definition.

npm i -D firebase-config-type-definition

# or

yarn add -D firebase-config-type-definition
// Example config

import { Firebaserc } from "firebase-config-type-definition";
const json: Firebaserc = {
  "hosting": [
    {
      "target": "hoge",
      "public": "packages/lib/hoge",
      "ignore": [
        "firebase.json",
        "**/.*",
        "**/node_modules/**"
      ]
    },
    {
      "target": "fuga",
      "public": "packages/fuga/public",
      "ignore": [
        "firebase.json",
        "**/.*",
        "**/node_modules/**"
      ]
    }
  ]
}
};

⚙ Mechanism

Use jsonschema of firebase config.

FYI: https://github.com/firebase/firebase-tools/blob/c2feb0836f6f64236e117f2906ef6083840e212b/src/index.js

🗒 License

MIT

0.0.2

3 years ago

0.0.1

3 years ago