Add patch to build tools to allow comments in build profiles. patch from
jwpage, r=me (Closes #1541) git-svn-id: http://svn.openlayers.org/trunk/openlayers@8979 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
# This is the full build with all files: this includes the vector-related files
|
||||||
|
# like Renderers and Formats.
|
||||||
|
|
||||||
[first]
|
[first]
|
||||||
OpenLayers/SingleFile.js
|
OpenLayers/SingleFile.js
|
||||||
OpenLayers.js
|
OpenLayers.js
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# This file includes the OpenLayers code to create a build for everything that
|
||||||
|
# does not require vector support. build.py uses this profile if no other one
|
||||||
|
# is specified.
|
||||||
|
|
||||||
[first]
|
[first]
|
||||||
OpenLayers/SingleFile.js
|
OpenLayers/SingleFile.js
|
||||||
OpenLayers.js
|
OpenLayers.js
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
# This file includes a small subset of OpenLayers code, designed to be
|
||||||
|
# integrated into another application. It includes only the Layer types
|
||||||
|
# neccesary to create tiled or untiled WMS, and does not include any Controls.
|
||||||
|
# This is the result of what was at the time called "Webmap.js" at the FOSS4G
|
||||||
|
# Web Mapping BOF.
|
||||||
|
|
||||||
[first]
|
[first]
|
||||||
OpenLayers/SingleFile.js
|
OpenLayers/SingleFile.js
|
||||||
OpenLayers.js
|
OpenLayers.js
|
||||||
|
|||||||
@@ -87,9 +87,10 @@ class Config:
|
|||||||
3rd/prototype.js
|
3rd/prototype.js
|
||||||
core/application.js
|
core/application.js
|
||||||
core/params.js
|
core/params.js
|
||||||
|
# A comment
|
||||||
|
|
||||||
[last]
|
[last]
|
||||||
core/api.js
|
core/api.js # Another comment
|
||||||
|
|
||||||
[exclude]
|
[exclude]
|
||||||
3rd/logger.js
|
3rd/logger.js
|
||||||
@@ -103,15 +104,17 @@ class Config:
|
|||||||
|
|
||||||
The files list in the `exclude` section will not be imported.
|
The files list in the `exclude` section will not be imported.
|
||||||
|
|
||||||
|
Any text appearing after a # symbol indicates a comment.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, filename):
|
def __init__(self, filename):
|
||||||
"""
|
"""
|
||||||
Parses the content of the named file and stores the values.
|
Parses the content of the named file and stores the values.
|
||||||
"""
|
"""
|
||||||
lines = [line.strip() # Assumes end-of-line character is present
|
lines = [re.sub("#.*?$", "", line).strip() # Assumes end-of-line character is present
|
||||||
for line in open(filename)
|
for line in open(filename)
|
||||||
if line.strip()] # Skip blank lines
|
if line.strip() and not line.strip().startswith("#")] # Skip blank lines and comments
|
||||||
|
|
||||||
self.forceFirst = lines[lines.index("[first]") + 1:lines.index("[last]")]
|
self.forceFirst = lines[lines.index("[first]") + 1:lines.index("[last]")]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user