# Common lib for Firebase
this library provide common class to write and read data into Firebase for Grabber projects

# Installation

    npm i npm-common-lib-for-firebase

add firebase certificate into your root folder and name it

    credential-firebase-adminsdk.json

# Develop and test 

To develop, we run:

    npm run watch-ts

Open any of grabber service and replace each import of 'npm-common-lib-for-firebase' with '../../npm-common-lib/src'.

Replace

    import { Crawler } from 'npm-common-lib-for-firebase';
    import { asyncForEach, groupBy, splitByServerIndex, Avvenimento, League } from 'npm-common-lib-for-firebase';

 With 
    import { Crawler } from '../../npm-common-lib/dist-js';
    import { asyncForEach, groupBy, splitByServerIndex, Avvenimento, League } from '../../npm-common-lib/dist-js';
 
 run (open it in terminal debug for debbuging)
    
    

# Deploy

    npm version patch
    npm run build
    npm publish


# Documentation

to build docs

    npx typedoc --out ./docs src
