diff --git a/build.py b/build.py index 0129d55881..9b6adc08e8 100755 --- a/build.py +++ b/build.py @@ -178,11 +178,9 @@ def build_ol_new_js(t): report_sizes(t) -@target('build/ol-simple.js', PLOVR_JAR, SRC, EXPORTS, SHADER_SRC, - 'buildcfg/base.json', 'buildcfg/ol.json', 'buildcfg/ol-simple.json') +@target('build/ol-simple.js', SRC, SHADER_SRC, 'buildcfg/ol-simple.json') def build_ol_simple_js(t): - t.output('%(JAVA)s', '-server', '-XX:+TieredCompilation', '-jar', - PLOVR_JAR, 'build', 'buildcfg/ol-simple.json') + t.run('node', 'tasks/build.js', 'buildcfg/ol-simple.json', 'build/ol-simple.js') report_sizes(t) diff --git a/buildcfg/ol-simple.json b/buildcfg/ol-simple.json index 5cb4be99de..9ea2246179 100644 --- a/buildcfg/ol-simple.json +++ b/buildcfg/ol-simple.json @@ -1,39 +1,63 @@ { - - // 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. - - "ambiguate-properties": false, - - "disambiguate-properties": false, - - "id": "ol-simple", - - "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": "SIMPLE", - - // Note: we can't have a (function(){%output%})() output wrapper with - // WHITESPACE and SIMPLE modes. See this link for explanations: - // https://groups.google.com/forum/#!topic/plovr/gQyZEa2NpsU - "output-wrapper": "%output%" + "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": "SIMPLE_OPTIMIZATIONS", + "output_wrapper": "%output%", + "use_types_for_optimization": false, + "manage_closure_dependencies": true + } }