Skip to content

Commit e8d0201

Browse files
authored
Update install instructions (#206)
* Update install instructions - make `npm install` the default - remove `cdn.firebase.com` because it is [deprecated](https://github.com/firebase/firebase-clients#updating-content) - add instructions for self-hosting the library - move `bower install` to the bottom * update ToC link
1 parent 5898090 commit e8d0201

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,37 @@ and [Java](https://github.com/firebase/geofire-java).
2020

2121
## Table of Contents
2222

23-
* [Downloading GeoFire](#downloading-geofire)
23+
* [Add GeoFire to your project](#add-geofire-to-your-project)
2424
* [Documentation](#documentation)
2525
* [Examples](#examples)
2626
* [Release Notes](https://github.com/firebase/geofire-js/releases)
2727
* [Migration Guides](#migration-guides)
2828
* [Contributing](#contributing)
2929

30+
## Add GeoFire to your project
3031

31-
## Downloading GeoFire
32+
The Firebase JS SDK is a peer dependency of GeoFire. Run the following command to install both libraries:
3233

33-
In order to use GeoFire in your project, you need to include the following files in your HTML:
34+
```bash
35+
$ npm install geofire firebase --save
36+
```
37+
38+
### HTML
39+
40+
Alternatively, you can include GeoFire in your HTML. To do so download a minified or non-minified version of GeoFire from the [releases page of this GitHub repository](https://github.com/firebase/geofire-js/releases). Then, deploy it to Hosting in your Firebase project.
3441

3542
```html
3643
<!-- Firebase -->
37-
<script src="https://www.gstatic.com/firebasejs/5.9.4/firebase-app.js"></script>
38-
<script src="https://www.gstatic.com/firebasejs/5.9.4/firebase-database.js"></script>
44+
<script src="https://www.gstatic.com/firebasejs/8.0.1/firebase-app.js"></script>
45+
<script src="https://www.gstatic.com/firebasejs/8.0.1/firebase-database.js"></script>
3946

40-
<!-- GeoFire -->
41-
<script src="https://cdn.firebase.com/libs/geofire/5.0.1/geofire.min.js"></script>
47+
<!-- GeoFire (TODO: substitute in your own project id)-->
48+
<script src="https://my-firebase-project.web.app/geofire-5.0.1.min.js"></script>
4249
```
4350

44-
Use the URL above to download both the minified and non-minified versions of GeoFire from the
45-
Firebase CDN. You can also download them from the
46-
[releases page of this GitHub repository](https://github.com/firebase/geofire-js/releases).
47-
48-
You can also install GeoFire via npm or Bower. If downloading via npm, you will have to install
49-
Firebase separately (because it is a peer dependency to GeoFire):
50-
51-
```bash
52-
$ npm install geofire firebase --save
53-
```
51+
### Bower
5452

55-
On Bower, the Firebase dependency will be downloaded automatically:
53+
If you use Bower, the Firebase dependency will be downloaded automatically:
5654

5755
```bash
5856
$ bower install geofire --save

0 commit comments

Comments
 (0)