0.4.0 • Published 8 months ago

svelte-on-fire v0.4.0

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

Svelte On Fire

Provides convenience methods to simplify your Svelte/Firebase app development.

Basics

  • Pre-created Svelte store for Firebase auth
  • Utility function to create additional Svelte stores that only return data when the user is authenticated
  • Convenience methods for easily querying Firestore

Quick Start

Install from NPM

npm install svelte-on-fire

And do not forget to install firebase dependencies

npm install firebase

Create a project at https://firebase.google.com/ and grab your web config. Create a .env file in your respository like:

VITE_FIREBASE_API_KEY=<your API key>
VITE_FIREBASE_AUTH_DOMAIN=<your auth domain>
VITE_FIREBASE_PROJECT_ID=<your project id>
VITE_FIREBASE_STORAGE_BUCKET=<your storage bucket>
VITE_FIREBASE_MESSAGE_SENDER_ID=<your sender id>
VITE_FIREBASE_APP_ID=<your app id>

Opt-in to the following services from the Firebase console to run the demo.

  1. Email/Password Login under authentication -> sign-in method
  2. Cloud Firestore under database. Make sure it's in test mode (or provide write access to the users/ collection using Security Rules).

Usage

Copy the contents of src/routes/+page.svelte and src/routes/firebase.ts and into your own project. This is a basic example of how to use the library.

Note: It's highly recommended to install the Firebase emulators and run them locally. This will allow you to test your app without having to deploy it to Firebase.

Publishing

  1. Run npm run build to build the library
  2. Run cd package to go into the package directory
  3. Run npm publish to publish the package to NPM
0.0.17

8 months ago

0.0.18

8 months ago

0.0.19

8 months ago

0.1.0

8 months ago

0.3.0

8 months ago

0.2.1

8 months ago

0.2.0

8 months ago

0.1.1

8 months ago

0.3.5

8 months ago

0.3.2

8 months ago

0.4.0

8 months ago

0.3.1

8 months ago

0.1.3

8 months ago

0.3.4

8 months ago

0.3.3

8 months ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago