source:
trunk/workshop-routing-foss4g/web/proj4js/build/buildUncompressed.py
@
78
Revision 76, 747 bytes checked in by djay, 13 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | #!/usr/bin/env python |
2 | |
3 | import sys |
4 | sys.path.append("../tools") |
5 | |
6 | import jsmin, mergejs |
7 | |
8 | sourceDirectory = "../lib" |
9 | configFilename = "library.cfg" |
10 | filename = "proj4js-combined.js" |
11 | outputFilename = "../lib/" + filename |
12 | |
13 | if len(sys.argv) > 1: |
14 | configFilename = sys.argv[1] + ".cfg" |
15 | if len(sys.argv) > 2: |
16 | outputFilename = sys.argv[2] |
17 | |
18 | print "Merging libraries." |
19 | merged = mergejs.run(sourceDirectory, None, configFilename) |
20 | print "Setting the filename to "+filename |
21 | merged = merged.replace('scriptName: "proj4js.js",','scriptName: "'+filename+'",'); |
22 | print "Adding license file." |
23 | merged = file("license.txt").read() + merged |
24 | |
25 | print "Writing to %s." % outputFilename |
26 | file(outputFilename, "w").write(merged) |
27 | |
28 | print "Done." |
Note: See TracBrowser
for help on using the repository browser.