Skip to content

Commit

Permalink
feat(config): update config
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-le-singe committed Dec 17, 2016
1 parent 9577eee commit 782d537
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
10 changes: 2 additions & 8 deletions src/common/config/dev.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import projectConfig from '../../../config'

const { SERVER_HOST, SERVER_PORT } = projectConfig

module.exports = {
host: SERVER_HOST,
port: SERVER_PORT,
export default {
app: {
htmlAttributes: { lang: 'en' },
title: 'React Redux Universal Boilerplate',
titleTemplate: 'React Redux Universal Boilerplate - %s',
meta: [
{ name: 'description', content: 'Another react universal starter boilerplate.' },
{ name: 'description', content: 'Another React/Redux universal boilerplate.' },
],
},
}
8 changes: 3 additions & 5 deletions src/common/config/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
if (__DEV__) {
module.exports = require('./dev')
} else {
module.exports = require('./prod')
}
const config = __DEV__ ? require('./dev').default : require('./prod').default

export default config
6 changes: 3 additions & 3 deletions src/common/config/prod.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const defaultConfig = require('./dev')
import defaultConfig from './dev'

const config = {
// Over write default settings here...
// extend and override dev config here.
}

module.exports = Object.assign({}, defaultConfig, config)
export default { ...defaultConfig, config }

0 comments on commit 782d537

Please sign in to comment.