conflicts fixed

This commit is contained in:
George Michael Brower 2011-04-19 12:12:56 -07:00
commit 43c1f26514
2 changed files with 6 additions and 4 deletions

View File

@ -140,7 +140,7 @@
</li>
<li>
<a href='https://github.com/dataarts/dat.gui/raw/master/build/DAT.GUI.js'><strong>Download the uncompressed source</strong></a>
<small id='buildsize'>[19.0kb]
<small id='buildsize'>[33.0kb]
</small>
</li>

View File

@ -121,15 +121,17 @@ def build(jssrc, csssrc=list([''])):
f.write(code)
compiled = compile(code)
outpath = os.path.join(BUILD_ROOT, BUILD_NAME+'.min.js')
with open(outpath,'w') as f:
outpathmin = os.path.join(BUILD_ROOT, BUILD_NAME+'.min.js')
with open(outpathmin,'w') as f:
f.write(compiled)
size = bytes_to_kb(os.path.getsize(outpath))
sizemin = bytes_to_kb(os.path.getsize(outpathmin))
with open(INDEX,'r') as f:
index = f.read()
with open(INDEX,'w') as f:
index = re.sub(r'\[[0-9.]+kb\]','[%skb]'%(size,),index)
index = re.sub(r'<small id=\'buildsize\'>\[[0-9.]+kb\]','<small id=\'buildsize\'>[%skb]'%(size,),index)
index = re.sub(r'<small id=\'buildsizemin\'>\[[0-9.]+kb\]','<small id=\'buildsizemin\'>[%skb]'%(sizemin,),index)
f.write(index)
print('DONE. Built files in %s.'%(BUILD_ROOT,))