Skip to content

Commit

Permalink
Config: Rename config library to make it work with Desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Mar 14, 2017
1 parent 2835d36 commit 42f2431
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions client/config/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// DO NOT USE ES6 MODULES OR IT WILL BREAK wp-desktop COMPATIBILITY
/**
* Internal dependencies
*/
var createConfig = require( 'lib/config' );
import createConfig from 'lib/create-config';

/**
* Manages config flags for various deployment builds
Expand All @@ -12,5 +11,5 @@ if ( 'undefined' === typeof window || ! window.configData ) {
throw new ReferenceError( 'No configuration was found: please see client/config/README.md for more information' );
}

module.exports = createConfig( window.configData );
export default createConfig( window.configData );

File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion client/sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const path = require( 'path' );
/**
* Internal dependencies
*/
const sections = require( 'wordpress-com' );
const config = require( 'config' );
const sections = require( config( 'project' ) );
const extensions = require( 'extensions' );

const extensionSections = extensions.map( extension => {
Expand Down
2 changes: 1 addition & 1 deletion server/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
const configPath = require( 'path' ).resolve( __dirname, '..', '..', 'config' );
const parser = require( './parser' );
const createConfig = require( 'lib/config' );
const createConfig = require( 'lib/create-config' );

const { serverData: data, clientData } = parser( configPath, {
env: process.env.CALYPSO_ENV || process.env.NODE_ENV || 'development',
Expand Down

0 comments on commit 42f2431

Please sign in to comment.