firebase-setup-web
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

npm version

firebase-setup-web

Important

In order to use this module,
you need to be able to execute "firebase setup:web" in the target project.

Installation

npm install --save-dev firebase-setup-web
# or 
yarn add -D firebase-setup-web

Usage

const config = require('firebase-setup-web');
 
const defParams = {
    'process.env.FB_PROJECT_ID': JSON.stringify(config.projectId),
}
 
// webpack config
module.exports = {
    plugins: [
        new webpack.DefinePlugin(defParam),
    ],
};

Using token

If you want to get config using token,
please set a token to environment valiable FB_CI_TOKEN.

export FB_CI_TOKEN="Set Here"

Interface

interface Config {
    apiKey: string;
    databaseURL: string;
    storageBucket: string;
    authDomain: string;
    messagingSenderId: string;
    projectId: string;
}

LICENSE

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    0
    • latest

Version History

Package Sidebar

Install

npm i firebase-setup-web

Weekly Downloads

4

Version

0.0.5

License

MIT

Unpacked Size

3.25 kB

Total Files

5

Last publish

Collaborators

  • taqm