Skip to content

Commit d5e4288

Browse files
AndreasRiccibojeil-google
authored andcommitted
Added CDN-based deploy instructions for Demo. (#152)
* Added CDN-based deploy instructions for Demo. * Added missing the in snippet instruction.
1 parent 14712f2 commit d5e4288

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

demo/README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You need to have created a Firebase Project in the
1010

1111
## Installation
1212

13-
Install the firebase command line tool with `npm install -g firebase-tools` (See
13+
Install the Firebase command line tool with `npm install -g firebase-tools` (See
1414
[docs](https://firebase.google.com/docs/cli/#setup)).
1515

1616
Enable the Auth providers you would like to offer your users in the console, under
@@ -47,6 +47,8 @@ in the `config.js` file.
4747

4848
## Deploy
4949

50+
### Option 1: Compile and use local FirebaseUI files
51+
5052
To deploy the demo app, run the following command in the root directory of FirebaseUI (use `cd ..`
5153
first if you are still in the `demo/` folder):
5254

@@ -55,4 +57,24 @@ npm run demo
5557
```
5658

5759
This will compile all the files needed to run FirebaseUI, and start a Firebase server locally at
58-
http://localhost:5000.
60+
[http://localhost:5000](http://localhost:5000).
61+
62+
### Option 2: Use CDN hosted FirebaseUI files
63+
64+
If you would prefer to use a CDN instead of locally compiled FirebaseUI files, you can instead
65+
locate the following in the `<head>` tag of `public/index.html` and `public/widget.html`:
66+
67+
```html
68+
<script src="dist/firebaseui.js"></script>
69+
<link type="text/css" rel="stylesheet" href="dist/firebaseui.css" />
70+
```
71+
72+
Then replace that with the snippet provided in the CDN installation section found at
73+
[https://github.com/firebase/firebaseui-web/blob/master/README.md](https://github.com/firebase/firebaseui-web/blob/master/README.md).
74+
75+
Finally, ensure you are in the `demo/` folder (and not the root directory of FirebaseUI), and run:
76+
```bash
77+
firebase serve
78+
```
79+
80+
This will start a Firebase server locally at [http://localhost:5000](http://localhost:5000).

0 commit comments

Comments
 (0)