Skip to content

Commit

Permalink
Move Plovr json files in specific dir
Browse files Browse the repository at this point in the history
  • Loading branch information
elemoine committed Mar 29, 2013
1 parent 15ae683 commit 5019f93
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 104 deletions.
44 changes: 23 additions & 21 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,34 +131,35 @@ def build_ol_css(t):


@target('build/ol.js', PLOVR_JAR, SRC, EXTERNAL_SRC, SHADER_SRC,
'base.json', 'build/ol.json')
'buildcfg/base.json', 'buildcfg/ol.json')
def build_ol_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'build/ol.json')
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol.json')
report_sizes(t)


@target('build/ol-simple.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
'base.json', 'build/ol.json', 'build/ol-simple.json')
'buildcfg/base.json', 'buildcfg/ol.json', 'buildcfg/ol-simple.json')
def build_ol_simple_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'build/ol-simple.json')
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol-simple.json')
report_sizes(t)


@target('build/ol-whitespace.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
'base.json', 'build/ol.json', 'build/ol-whitespace.json')
'buildcfg/base.json', 'buildcfg/ol.json',
'buildcfg/ol-whitespace.json')
def build_ol_whitespace_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR,
'build', 'build/ol-whitespace.json')
'build', 'buildcfg/ol-whitespace.json')
report_sizes(t)


virtual('build-all', 'build/ol-all.js')


@target('build/ol-all.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
'base.json', 'build/ol-all.json')
'buildcfg/base.json', 'buildcfg/ol-all.json')
def build_ol_all_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'build/ol-all.json')
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol-all.json')


@target('build/src/external/externs/types.js', 'bin/generate-exports.py',
Expand Down Expand Up @@ -245,24 +246,24 @@ def examples_star_json(name, match):
def action(t):
content = json.dumps({
'id': match.group('id'),
'inherits': '../../base.json',
'inherits': '../../buildcfg/base.json',
'inputs': [
'examples/%(id)s.js' % match.groupdict(),
'build/src/internal/src/types.js',
'../examples/%(id)s.js' % match.groupdict(),
'../build/src/internal/src/types.js',
],
'externs': [
'//json.js',
'//jquery-1.7.js',
'externs/bingmaps.js',
'externs/bootstrap.js',
'externs/geojson.js',
'externs/proj4js.js',
'externs/tilejson.js',
'../externs/bingmaps.js',
'../externs/bootstrap.js',
'../externs/geojson.js',
'../externs/proj4js.js',
'../externs/tilejson.js',
],
})
with open(t.name, 'w') as f:
f.write(content)
dependencies = [__file__, 'base.json']
dependencies = [__file__, 'buildcfg/base.json']
return Target(name, action=action, dependencies=dependencies)


Expand All @@ -272,22 +273,23 @@ def action(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build',
'build/examples/%(id)s.json' % match.groupdict())
report_sizes(t)
dependencies = [PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC, 'base.json',
dependencies = [PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
'buildcfg/base.json',
'examples/%(id)s.js' % match.groupdict(),
'build/examples/%(id)s.json' % match.groupdict()]
return Target(name, action=action, dependencies=dependencies)


@target('serve', PLOVR_JAR, INTERNAL_SRC, 'test/requireall.js', 'examples')
def serve(t):
t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', 'build/ol.json',
'build/ol-all.json', EXAMPLES_JSON, 'test/test.json')
t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', 'buildcfg/ol.json',
'buildcfg/ol-all.json', EXAMPLES_JSON, 'buildcfg/test.json')


@target('serve-integration-test', PLOVR_JAR, INTERNAL_SRC)
def serve_precommit(t):
t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve',
'build/ol-all.json', 'test/test.json')
'buildcfg/ol-all.json', 'buildcfg/test.json')


virtual('lint', 'build/lint-timestamp', 'build/check-requires-timestamp')
Expand Down
12 changes: 0 additions & 12 deletions build/ol-all.json

This file was deleted.

37 changes: 0 additions & 37 deletions build/ol.json

This file was deleted.

12 changes: 6 additions & 6 deletions base.json → buildcfg/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@

"externs": [
"//json.js",
"externs/bingmaps.js",
"externs/geojson.js",
"externs/proj4js.js",
"externs/tilejson.js"
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/proj4js.js",
"../externs/tilejson.js"
],

"level": "VERBOSE",

"mode": "ADVANCED",

"paths": [
"build/src/internal/src",
"src"
"../build/src/internal/src",
"../src"
],

"treat-warnings-as-errors": false
Expand Down
12 changes: 12 additions & 0 deletions buildcfg/ol-all.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{

"id": "ol-all",

"inherits": "base.json",

"inputs": [
"../build/src/internal/src/requireall.js",
"../build/src/internal/src/types.js"
]

}
12 changes: 6 additions & 6 deletions build/ol-simple.json → buildcfg/ol-simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@

"externs": [
"//json.js",
"externs/bingmaps.js",
"externs/geojson.js",
"externs/proj4js.js",
"externs/tilejson.js"
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/proj4js.js",
"../externs/tilejson.js"
],

"inherits": "ol.json",

"inputs": [
"build/src/internal/src/requireall.js",
"build/src/internal/src/types.js"
"../build/src/internal/src/requireall.js",
"../build/src/internal/src/types.js"
],

"mode": "SIMPLE",
Expand Down
12 changes: 6 additions & 6 deletions build/ol-whitespace.json → buildcfg/ol-whitespace.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@

"externs": [
"//json.js",
"externs/bingmaps.js",
"externs/geojson.js",
"externs/proj4js.js",
"externs/tilejson.js"
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/proj4js.js",
"../externs/tilejson.js"
],

"inherits": "ol.json",

"inputs": [
"build/src/internal/src/requireall.js",
"build/src/internal/src/types.js"
"../build/src/internal/src/requireall.js",
"../build/src/internal/src/types.js"
],

"mode": "WHITESPACE",
Expand Down
37 changes: 37 additions & 0 deletions buildcfg/ol.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{

"id": "ol",

"css-allowed-unrecognized-properties": [
"user-select"
],

"css-inputs": [
"../css/ol.css"
],

"css-output-file": "../build/ol.css",

"externs": [
"//json.js",
"../build/src/external/externs/types.js",
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/proj4js.js",
"../externs/tilejson.js"
],

"inherits": "base.json",

"inputs": [
"../build/src/external/src/exports.js",
"../build/src/external/src/types.js"
],

"output-wrapper": "(function(){%output%})();",

"paths": [
"../src"
]

}
16 changes: 16 additions & 0 deletions buildcfg/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{

"id": "test",

"inherits": "base.json",

"inputs": [
"../test/requireall.js"
],

"paths": [
"../src",
"../test"
]

}
16 changes: 0 additions & 16 deletions test/test.json

This file was deleted.

0 comments on commit 5019f93

Please sign in to comment.