Update build tools to make it possible to build a 'lite' version of the single file library.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1594 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+5
-1
@@ -9,7 +9,11 @@ TMP_OUTPUT_FILENAME=tmp.${OUTPUT_FILENAME}
|
|||||||
|
|
||||||
TOOLS_DIR=../tools
|
TOOLS_DIR=../tools
|
||||||
|
|
||||||
CFG_FILENAME=library.cfg
|
if [ "$1" != "" ]; then
|
||||||
|
CFG_FILENAME="$1.cfg"
|
||||||
|
else
|
||||||
|
CFG_FILENAME=library.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
SRC_DIR=../lib
|
SRC_DIR=../lib
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -1,11 +1,13 @@
|
|||||||
[first]
|
[first]
|
||||||
Prototype.js
|
|
||||||
Rico/Corner.js
|
|
||||||
OpenLayers/SingleFile.js
|
OpenLayers/SingleFile.js
|
||||||
OpenLayers.js
|
OpenLayers.js
|
||||||
|
OpenLayers/BaseTypes.js
|
||||||
|
Rico/Corner.js
|
||||||
|
|
||||||
[last]
|
[last]
|
||||||
|
|
||||||
|
[include]
|
||||||
|
|
||||||
[exclude]
|
[exclude]
|
||||||
OpenLayers/Layer/Yahoo.js
|
OpenLayers/Layer/Yahoo.js
|
||||||
OpenLayers/Control/KeyboardDefaults.js
|
OpenLayers/Control/KeyboardDefaults.js
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
[first]
|
||||||
|
OpenLayers/SingleFile.js
|
||||||
|
OpenLayers.js
|
||||||
|
OpenLayers/BaseTypes.js
|
||||||
|
OpenLayers/Util.js
|
||||||
|
|
||||||
|
[last]
|
||||||
|
|
||||||
|
[include]
|
||||||
|
OpenLayers/Events.js
|
||||||
|
OpenLayers/Map.js
|
||||||
|
OpenLayers/Layer.js
|
||||||
|
OpenLayers/Layer/Grid.js
|
||||||
|
OpenLayers/Layer/HTTPRequest.js
|
||||||
|
OpenLayers/Layer/WMS.js
|
||||||
|
OpenLayers/Layer/WMS/Untiled.js
|
||||||
|
OpenLayers/Tile.js
|
||||||
|
OpenLayers/Tile/Image.js
|
||||||
|
|
||||||
|
[exclude]
|
||||||
+7
-3
@@ -123,8 +123,8 @@ class Config:
|
|||||||
|
|
||||||
self.forceFirst = lines[lines.index("[first]") + 1:lines.index("[last]")]
|
self.forceFirst = lines[lines.index("[first]") + 1:lines.index("[last]")]
|
||||||
|
|
||||||
self.forceLast = lines[lines.index("[last]") + 1:lines.index("[exclude]")]
|
self.forceLast = lines[lines.index("[last]") + 1:lines.index("[include]")]
|
||||||
|
self.include = lines[lines.index("[include]") + 1:lines.index("[exclude]")]
|
||||||
self.exclude = lines[lines.index("[exclude]") + 1:]
|
self.exclude = lines[lines.index("[exclude]") + 1:]
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
@@ -150,6 +150,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
cfg = Config(filename)
|
cfg = Config(filename)
|
||||||
|
|
||||||
|
print cfg.include
|
||||||
allFiles = []
|
allFiles = []
|
||||||
|
|
||||||
## Find all the Javascript source files
|
## Find all the Javascript source files
|
||||||
@@ -157,7 +158,10 @@ if __name__ == "__main__":
|
|||||||
for filename in files:
|
for filename in files:
|
||||||
if filename.endswith(SUFFIX_JAVASCRIPT) and not filename.startswith("."):
|
if filename.endswith(SUFFIX_JAVASCRIPT) and not filename.startswith("."):
|
||||||
filepath = os.path.join(root, filename)[len(sourceDirectory)+1:]
|
filepath = os.path.join(root, filename)[len(sourceDirectory)+1:]
|
||||||
if (not cfg) or (filepath not in cfg.exclude):
|
if cfg and cfg.include:
|
||||||
|
if filepath in cfg.include or filepath in cfg.forceFirst:
|
||||||
|
allFiles.append(filepath)
|
||||||
|
elif (not cfg) or (filepath not in cfg.exclude):
|
||||||
allFiles.append(filepath)
|
allFiles.append(filepath)
|
||||||
|
|
||||||
## Header inserted at the start of each file in the output
|
## Header inserted at the start of each file in the output
|
||||||
|
|||||||
Reference in New Issue
Block a user