@preignition/lit-firebase

0.4.0 • Public • Published

<preignition/lif>

This webcomponent follows the open-wc recommendation.

A lit-element based implementation of polymerfire.

For the time being, only firebase-document and firebase-query have been migrated (to resp. lif-document and lif-query). firebase-auth and firebase-app will not be upgraded as it is usually simpler to instantiate database and handle authentication via js.

Those components require firebase SDK to be made available on the client (see https://firebase.google.com/docs/web/setup).

Use at your own risks as this is beta product.

Installation

npm i @preignition/lifbase

Usage

<script type="module">
  import '@preignition/lifbase';
</script>

and in lit-element render: 

<lif-document path="myPath" @data-changed="${e=> this.data = e.detail.value}"></lif-document>
<lif-query path="myPath" @data-changed="${e=> this.data = e.detail.value}"></lif-query>

Testing with Karma

To run the suite of karma tests, run

npm run test

or to run them in compatibility mode for legacy browsers

npm run test:compatibility

To run the tests in watch mode (for TDD, for example), run

npm run test:watch

or

npm run test:compatibility

/@preignition/lit-firebase/

    Package Sidebar

    Install

    npm i @preignition/lit-firebase

    Weekly Downloads

    0

    Version

    0.4.0

    License

    MIT

    Unpacked Size

    274 kB

    Total Files

    22

    Last publish

    Collaborators

    • krikrou