Use build.js for ol.js

This commit is contained in:
Éric Lemoine
2014-06-30 10:55:13 +02:00
parent 064f95f530
commit 04e60a9d37
2 changed files with 64 additions and 42 deletions

View File

@@ -172,11 +172,9 @@ def build_ol_css(t):
t.touch()
@target('build/ol.js', PLOVR_JAR, SRC, EXPORTS, SHADER_SRC,
'buildcfg/base.json', 'buildcfg/ol.json')
def build_ol_js(t):
t.output('%(JAVA)s', '-server', '-XX:+TieredCompilation', '-jar',
PLOVR_JAR, 'build', 'buildcfg/ol.json')
@target('build/ol.js', SRC, SHADER_SRC, 'buildcfg/ol.json')
def build_ol_new_js(t):
t.run('node', 'tasks/build.js', 'buildcfg/ol.json', 'build/ol.js')
report_sizes(t)

View File

@@ -1,39 +1,63 @@
{
"id": "ol",
"css-allowed-unrecognized-properties": [
"user-select"
],
"css-inputs": [
"../css/ol.css"
],
"css-output-file": "../build/ol.css",
"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"
"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": "base.json",
"inputs": [
"../build/exports.js"
"define": [
"goog.dom.ASSUME_STANDARDS_MODE=true",
"goog.DEBUG=false"
],
"output-wrapper": "// OpenLayers 3. see http://ol3js.org/\n(function(){%output%})();",
"paths": [
"../src"
]
"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": "ADVANCED_OPTIMIZATIONS",
"output_wrapper": "// OpenLayers 3. See http://ol3.js.org/\n(function(){%output%})();",
"use_types_for_optimization": true,
"manage_closure_dependencies": true
}
}