Skip to content

Commit

Permalink
Add target to concatenate and build all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Oct 10, 2013
1 parent effc09e commit e2df5ce
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
17 changes: 16 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ def build_src_internal_types_js(t):
'--typedef', 'src/objectliterals.jsdoc')


virtual('build-examples', 'examples', EXAMPLES_COMBINED)
virtual('build-examples', 'examples', 'build/examples/all.combined.js',
EXAMPLES_COMBINED)


virtual('examples', 'examples/example-list.xml', EXAMPLES_JSON)
Expand All @@ -299,6 +300,20 @@ def examples_examples_list_js(t):
t.run('%(PYTHON)s', 'bin/exampleparser.py', 'examples', 'examples')


@target('build/examples/all.combined.js', 'build/examples/all.js', PLOVR_JAR,
SRC, INTERNAL_SRC, SHADER_SRC, LIBTESS_JS_SRC,
'buildcfg/base.json', 'build/examples/all.json')
def build_examples_all_combined_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build',
'buildcfg/examples-all.json')
report_sizes(t)


@target('build/examples/all.js', EXAMPLES_SRC)
def build_examples_all_js(t):
t.output('bin/combine-examples.py', t.dependencies)


@rule(r'\Abuild/examples/(?P<id>.*).json\Z')
def examples_star_json(name, match):
def action(t):
Expand Down
20 changes: 20 additions & 0 deletions buildcfg/examples-all.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"externs": [
"//json.js",
"//jquery-1.7.js",
"../externs/bingmaps.js",
"../externs/bootstrap.js",
"../externs/geojson.js",
"../externs/topojson.js",
"../externs/oli.js",
"../externs/proj4js.js",
"../externs/tilejson.js",
"../externs/closure-compiler.js"
],
"id": "simple",
"inherits": "base.json",
"inputs": [
"../build/examples/all.js",
"../build/src/internal/src/types.js"
]
}

0 comments on commit e2df5ce

Please sign in to comment.