Skip to content

Commit

Permalink
Huge savings switching to modular Firebase builds (#48)
Browse files Browse the repository at this point in the history
* Bump to more recent version of Firebase

* Switch to using modular Firebase builds

* Add updated static build
  • Loading branch information
addyosmani authored and yyx990803 committed Nov 13, 2016
1 parent b74e8eb commit a4ada13
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"es6-promise": "^3.0.2",
"firebase": "^2.4.2",
"firebase": "^3.4.1",
"vue": "^1.0.26",
"vue-router": "^0.7.13"
}
Expand Down
10 changes: 8 additions & 2 deletions src/store/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import Firebase from 'firebase'
import Firebase from 'firebase/app'
import Database from 'firebase/database'
import { EventEmitter } from 'events'
import { Promise } from 'es6-promise'

const api = new Firebase('https://hacker-news.firebaseio.com/v0')
const config = {
databaseURL: 'https://hacker-news.firebaseio.com'
}
Firebase.initializeApp(config)
const version = '/v0'
const api = Firebase.database().ref(version)
const itemsCache = Object.create(null)
const store = new EventEmitter()
const storiesPerPage = store.storiesPerPage = 30
Expand Down
Loading

0 comments on commit a4ada13

Please sign in to comment.