Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samouri committed Feb 11, 2017
1 parent 949a25a commit 74a0d6c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env-config.sh
/server/devdocs/search-index.js
/server/devdocs/components-usage-stats.json
/server/devdocs/proptypes-index.json
/server/bundler/assets-*.json
/server/bundler/assets.json

*.rdb
*.db
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ build-server: install
@CALYPSO_ENV=$(CALYPSO_ENV) $(NODE_BIN)/webpack --display-error-details --config webpack.config.node.js

build: install build-server build-dll build-css server/devdocs/search-index.js server/devdocs/proptypes-index.json server/devdocs/components-usage-stats.json
@$(BUNDLER)

build-css: public/style.css public/style-rtl.css public/style-debug.css public/editor.css

Expand Down
7 changes: 3 additions & 4 deletions client/config/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
let config;
if ( typeof window !== 'undefined' ) {

if ( typeof window !== 'undefined' && window.config ) {
config = window.config;
config.anyEnabled = window.anyEnabled;
config.isEnabled = window.isEnabled;
} else {
config = () => false;
config.isEnabled = () => false;
config.anyEnabled = () => false;
throw new Error( 'config not available' );
}

export default config;
2 changes: 1 addition & 1 deletion server/bundler/bin/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ webpack( webpackConfig, function( error, stats ) {

assets = utils.getAssets( stats.toJson() );

fs.writeFileSync( path.join( __dirname, '..', 'assets-' + CALYPSO_ENV + '.json' ), JSON.stringify( assets, null, '\t' ) );
fs.writeFileSync( path.join( __dirname, '..', 'assets.json' ), JSON.stringify( assets, null, '\t' ) );

files = assets.map( function( chunk ) {
return path.join( process.cwd(), 'public', chunk.file );
Expand Down

0 comments on commit 74a0d6c

Please sign in to comment.