diff --git a/build.py b/build.py index 9b6adc08e8..f6b8101d9b 100755 --- a/build.py +++ b/build.py @@ -184,12 +184,9 @@ def build_ol_simple_js(t): report_sizes(t) -@target('build/ol-whitespace.js', PLOVR_JAR, SRC, EXPORTS, - SHADER_SRC, 'buildcfg/base.json', 'buildcfg/ol.json', - 'buildcfg/ol-whitespace.json') +@target('build/ol-whitespace.js', SRC, SHADER_SRC, 'buildcfg/ol-whitespace.json') def build_ol_whitespace_js(t): - t.output('%(JAVA)s', '-server', '-XX:+TieredCompilation', '-jar', - PLOVR_JAR, 'build', 'buildcfg/ol-whitespace.json') + t.run('node', 'tasks/build.js', 'buildcfg/ol-whitespace.json', 'build/ol-whitespace.js') report_sizes(t) diff --git a/buildcfg/ol-whitespace.json b/buildcfg/ol-whitespace.json index c409225de4..77959e60a5 100644 --- a/buildcfg/ol-whitespace.json +++ b/buildcfg/ol-whitespace.json @@ -1,42 +1,63 @@ { - - "id": "ol-whitespace", - - // If ambiguate-properties and disambiguate-properties are set to true - // we get function names like "ol_control_Control_prototype$setMap" in - // the compiled code when using the SIMPLE compilation. It looks like - // "ambiguate-properties" and "disambiguate-properties" are only - // appropriate for ADVANCED compilation. To be sure we also don't - // set them for WHITESPACE. - - "ambiguate-properties": false, - - "disambiguate-properties": false, - - "externs": [ - "../externs/bingmaps.js", - "../externs/closure-compiler.js", - "../externs/geojson.js", - "../externs/oli.js", - "../externs/olx.js", - "../externs/proj4js.js", - "../externs/tilejson.js", - "../externs/topojson.js", - "../externs/vbarray.js" - ], - - "inherits": "ol.json", - - "inputs": [ - "../build/exports.js" - ], - - "mode": "WHITESPACE", - - "output-wrapper": [ - "var CLOSURE_NO_DEPS = true;\n", - "%output%" - ], - - "pretty-print": true + "exports": ["*"], + "src": ["src/**/*.js"], + "compile": { + "externs": [ + "externs/bingmaps.js", + "externs/closure-compiler.js", + "externs/geojson.js", + "externs/oli.js", + "externs/olx.js", + "externs/proj4js.js", + "externs/tilejson.js", + "externs/topojson.js", + "externs/vbarray.js" + ], + "define": [ + "goog.dom.ASSUME_STANDARDS_MODE=true", + "goog.DEBUG=false" + ], + "jscomp_error": [ + "accessControls", + "ambiguousFunctionDecl", + "checkDebuggerStatement", + "checkEventfulObjectDisposal", + "checkProvides", + "checkRegExp", + "checkStructDictInheritance", + "checkTypes", + "checkVars", + "const", + "constantProperty", + "deprecated", + "duplicate", + "duplicateMessage", + "es3", + "externsValidation", + "fileoverviewTags", + "globalThis", + "internetExplorerChecks", + "invalidCasts", + "misplacedTypeAnnotation", + "missingProperties", + "nonStandardJsDocs", + "strictModuleDepCheck", + "suspiciousCode", + "typeInvalidation", + "tweakValidation", + "undefinedNames", + "undefinedVars", + "unknownDefines", + "uselessCode", + "violatedModuleDep", + "visibility" + ], + "jscomp_off": [ + "es5Strict" + ], + "compilation_level": "WHITESPACE_ONLY", + "output_wrapper": "var CLOSURE_DEPS = false;\n%output%", + "use_types_for_optimization": false, + "manage_closure_dependencies": true + } }