Merge pull request #13 from sthzg/feat_update_app_config

Config -- added base config object for env-independent settings (Provided by @sthzg)
This commit is contained in:
Chris
2015-11-23 09:09:09 +01:00
8 changed files with 28 additions and 6 deletions
+1
View File
@@ -72,6 +72,7 @@
"webpack-dev-server": "^1.12.0"
},
"dependencies": {
"core-js": "^1.2.6",
"lodash": "^3.10.1",
"normalize.css": "^3.0.3",
"react": "^0.14.0",
+1
View File
@@ -1,4 +1,5 @@
/*eslint no-console:0 */
require('core-js/fn/object/assign');
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
+1
View File
@@ -1,3 +1,4 @@
import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './Main';
+6
View File
@@ -0,0 +1,6 @@
'use strict';
// Settings configured here will be merged into the final config object.
export default {
}
+5 -2
View File
@@ -1,7 +1,10 @@
'use strict';
const config = {
import baseConfig from './base';
let config = {
appEnv: 'dev' // feel free to remove the appEnv property here
};
export default config;
export default Object.freeze(Object.assign({}, baseConfig, config));
+6 -2
View File
@@ -1,7 +1,11 @@
'use strict';
const config = {
import baseConfig from './base';
let config = {
appEnv: 'dist' // feel free to remove the appEnv property here
};
export default config;
export default Object.freeze(Object.assign({}, baseConfig, config));
+6 -2
View File
@@ -1,7 +1,11 @@
'use strict';
const config = {
import baseConfig from './base';
let config = {
appEnv: 'test' // don't remove the appEnv property here
};
export default config;
export default Object.freeze(Object.assign(baseConfig, config));
+2
View File
@@ -1,5 +1,7 @@
'use strict';
require('core-js/fn/object/assign');
// Add support for all files in the test directory
const testsContext = require.context('.', true, /(Test\.js$)|(Helper\.js$)/);
testsContext.keys().forEach(testsContext);