build.py -c closure: Show file name and line number of errors and warnings.

This commit is contained in:
Xavier Mamano
2011-12-05 20:11:00 +01:00
parent acaf67b01c
commit 7169eba788
4 changed files with 117 additions and 32 deletions

View File

@@ -139,9 +139,14 @@ def undesired(filepath, excludes):
exclude = True
break
return exclude
def getNames (sourceDirectory, configFile = None):
return run(sourceDirectory, None, configFile, True)
def run (sourceDirectory, outputFilename = None, configFile = None):
def run (sourceDirectory, outputFilename = None, configFile = None,
returnAsListOfNames = False):
cfg = None
if configFile:
cfg = Config(configFile)
@@ -219,6 +224,16 @@ def run (sourceDirectory, outputFilename = None, configFile = None):
## Output the files in the determined order
result = []
# Return as a list of filenames
if returnAsListOfNames:
for fp in order:
fName = os.path.normpath(os.path.join(sourceDirectory, fp)).replace("\\","/")
print "Append: ", fName
result.append(fName)
print "\nTotal files: %d " % len(result)
return result
# Return as merged source code
for fp in order:
f = files[fp]
print "Exporting: ", f.filepath