Removing environment specific config (#266)

This commit is contained in:
Mike Arpaia 2016-10-03 15:50:28 -04:00 committed by GitHub
parent a0a911d9b2
commit 9312247661
4 changed files with 2 additions and 26 deletions

View file

@ -1,5 +0,0 @@
import { environments } from './index.js';
export default {
env: environments.development,
};

View file

@ -1,5 +0,0 @@
import { environments } from './index.js';
export default {
env: environments.production,
};

View file

@ -1,9 +0,0 @@
export const environments = {
development: 'DEV',
production: 'PROD',
};
const env = process.env.NODE_ENV || environments.development;
const configFileLocation = `./config.${env}.js`;
const settings = require(configFileLocation).default;
export default { environments, settings };

View file

@ -1,7 +1,4 @@
import config from '../config';
const { window } = global;
const { settings } = config;
const local = {
clear: () => {
@ -11,15 +8,13 @@ const local = {
},
getItem: (itemName) => {
const { localStorage } = window;
const { env } = settings;
return localStorage.getItem(`KOLIDE-${env}::${itemName}`);
return localStorage.getItem(`KOLIDE::${itemName}`);
},
setItem: (itemName, value) => {
const { localStorage } = window;
const { env } = settings;
return localStorage.setItem(`KOLIDE-${env}::${itemName}`, value);
return localStorage.setItem(`KOLIDE::${itemName}`, value);
},
};