From 2583cb2edf005ca0ef38c071f14e2cb142e4b4f9 Mon Sep 17 00:00:00 2001 From: Shaun Ellis Date: Tue, 26 Jun 2018 21:19:35 -0400 Subject: [PATCH] WIP - removes firebase config from plugin and imports a config file that is gitignored --- .gitignore | 2 ++ src/plugins/firebase.js | 11 ++--------- src/plugins/vuegooglemaps.js | 3 ++- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index c1356d3..d5f3f41 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ node_modules npm-debug.log* yarn-debug.log* yarn-error.log* +src/helpers/firebaseConfig.js +src/helpers/googleMapsConfig.js # Editor directories and files .idea diff --git a/src/plugins/firebase.js b/src/plugins/firebase.js index 8360978..46fc159 100644 --- a/src/plugins/firebase.js +++ b/src/plugins/firebase.js @@ -4,16 +4,9 @@ import * as firebase from 'firebase'; import * as GeoFire from 'geofire'; import VueFire from 'vuefire'; import store from '../store/index' +import {config} from '../helpers/firebaseConfig' -const app = { - apiKey: "AIzaSyCZTIICdE_LL7xA7nHJ_81uUHYv7g6DjkA", - authDomain: "tree-photos.firebaseapp.com", - databaseURL: "https://tree-photos.firebaseio.com", - projectId: "tree-photos", - storageBucket: "gs://tree-photos.appspot.com", - messagingSenderId: "24380484990" -}; -firebase.initializeApp(app); +firebase.initializeApp(config) export const fireb = firebase //export const fireui = firebaseui diff --git a/src/plugins/vuegooglemaps.js b/src/plugins/vuegooglemaps.js index 63944da..92f70dd 100644 --- a/src/plugins/vuegooglemaps.js +++ b/src/plugins/vuegooglemaps.js @@ -1,9 +1,10 @@ import * as VueGoogleMaps from 'vue2-google-maps' +import {gmConfig} from '../helpers/googleMapsConfig' export default ({ Vue }) => { Vue.use(VueGoogleMaps, { load: { - key: 'AIzaSyC6Mxo0j7utiBOS9eW5qCvXQgPXHgJNIYI', + key: gmConfig.apiKey, libraries: 'places' // necessary for places input } })