Skip to content

Commit

Permalink
remove windowconfig option (#4130)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinmombay authored Jul 20, 2016
1 parent 33a71d2 commit 4618a11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 41 deletions.
5 changes: 1 addition & 4 deletions build-system/tasks/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

var fs = require('fs-extra');
var argv = require('minimist')(process.argv.slice(2));
var windowConfig = require('../window-config');
var closureCompiler = require('gulp-closure-compiler');
var gulp = require('gulp');
var rename = require('gulp-rename');
Expand Down Expand Up @@ -89,9 +88,7 @@ function compile(entryModuleFilename, outputDir,
var unneededFiles = [
'build/fake-module/third_party/babel/custom-babel-helpers.js',
];
var wrapper = (options.includeWindowConfig ?
windowConfig.getTemplate() : '') +
'(function(){var process={env:{NODE_ENV:"production"}};' +
var wrapper = '(function(){var process={env:{NODE_ENV:"production"}};' +
'%output%})();';
if (options.wrapper) {
wrapper = options.wrapper.replace('<%= contents %>',
Expand Down
32 changes: 0 additions & 32 deletions build-system/window-config.js

This file was deleted.

7 changes: 2 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ var minimist = require('minimist');
var source = require('vinyl-source-stream');
var touch = require('touch');
var watchify = require('watchify');
var windowConfig = require('./build-system/window-config');
var internalRuntimeVersion = require('./build-system/internal-version').VERSION;
var internalRuntimeToken = require('./build-system/internal-version').TOKEN;

Expand Down Expand Up @@ -148,8 +147,7 @@ function compile(watch, shouldMinify, opt_preventRemoveAndMakeDir,
minify: shouldMinify,
// If there is a sync JS error during initial load,
// at least try to unhide the body.
wrapper: windowConfig.getTemplate() +
'try{(function(){<%= contents %>})()}catch(e){' +
wrapper: 'try{(function(){<%= contents %>})()}catch(e){' +
'setTimeout(function(){' +
'var s=document.body.style;' +
's.opacity=1;' +
Expand All @@ -166,7 +164,7 @@ function compile(watch, shouldMinify, opt_preventRemoveAndMakeDir,
watch: watch,
preventRemoveAndMakeDir: opt_preventRemoveAndMakeDir,
minify: shouldMinify,
wrapper: windowConfig.getTemplate() + '<%= contents %>'
wrapper: '<%= contents %>'
});
thirdPartyBootstrap(watch, shouldMinify);
}
Expand Down Expand Up @@ -756,7 +754,6 @@ function buildAlp(options) {
toName: 'alp.max.js',
watch: options.watch,
minify: options.minify || argv.minify,
includeWindowConfig: true,
includePolyfills: true,
minifiedName: 'alp.js',
preventRemoveAndMakeDir: options.preventRemoveAndMakeDir,
Expand Down

0 comments on commit 4618a11

Please sign in to comment.