Skip to content

Commit

Permalink
Revert "Make client-config optional"
Browse files Browse the repository at this point in the history
This reverts commit 8af36cd.
  • Loading branch information
satya164 committed May 26, 2015
1 parent 31fa604 commit 3ab35d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
8 changes: 2 additions & 6 deletions client-config-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@ var defaults = {
};

module.exports = (function() {
var changes;
var changes = require("./client-config.js");

try {
changes = require("./client-config.js");
} catch (e) {
changes = {};
}
if (!changes) changes = {};

return merge(defaults, changes);
}());
7 changes: 3 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var gulp = require("gulp"),
del = require("del"),
bower = require("bower"),
browserify = require("browserify"),
optional = require("browserify-optional"),
reactify = require("reactify"),
babelify = require("babelify").configure({ extensions: [ ".es6", ".jsx" ] }),
source = require("vinyl-source-stream"),
Expand Down Expand Up @@ -162,7 +161,7 @@ gulp.task("polyfills", [ "bower" ], function() {
gulp.task("bundle", function() {
return bundle([ "ui/app.es6" ], {
debug: true,
transform: [ babelify, reactify, optional ]
transform: [ babelify, reactify ]
})
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(buildscripts())
Expand All @@ -178,7 +177,7 @@ gulp.task("bundle", function() {
gulp.task("embed-legacy", function() {
return bundle("embed/embed-parent.js", {
debug: true,
transform: [ babelify, optional ]
transform: [ babelify ]
})
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(buildscripts())
Expand All @@ -190,7 +189,7 @@ gulp.task("embed-legacy", function() {
gulp.task("embed-apis", function() {
return bundle("widget/index.js", {
debug: true,
transform: [ babelify, optional ]
transform: [ babelify ]
})
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(buildscripts())
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"blanket": "latest",
"bower": "latest",
"browserify": "latest",
"browserify-optional": "latest",
"browserstack-webdriver": "latest",
"chai": "latest",
"del": "latest",
Expand Down
2 changes: 1 addition & 1 deletion widget/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env browser */

"use strict";
var config = require("../client-config-defaults.js");
var config = require("../client-config.js");
var host = config.server.protocol + "//" + config.server.host;
var iframeCount = 0,
widgets = {};
Expand Down

0 comments on commit 3ab35d4

Please sign in to comment.