minify before overwriting old file; oxjs removes old tree, always build geo
This commit is contained in:
parent
2ad4aad1c5
commit
0b103afeca
1 changed files with 2 additions and 6 deletions
|
@ -205,11 +205,7 @@ def update_static():
|
|||
oxjs_build = os.path.join(settings.STATIC_ROOT, 'oxjs/tools/build/build.py')
|
||||
if os.path.exists(oxjs_build):
|
||||
print 'update oxjs'
|
||||
if os.path.exists(os.path.join(settings.STATIC_ROOT, 'oxjs/min/Geo/json/Geo.json')):
|
||||
geo = '-nogeo'
|
||||
else:
|
||||
geo = ''
|
||||
os.system('%s %s >/dev/null' % (oxjs_build, geo))
|
||||
os.system('%s >/dev/null' % oxjs_build)
|
||||
|
||||
data = ''
|
||||
js = []
|
||||
|
@ -234,8 +230,8 @@ def update_static():
|
|||
'png/icon.png',
|
||||
]
|
||||
print 'write', pandora_js
|
||||
with open(pandora_js, 'w') as f:
|
||||
data = ox.js.minify(data)
|
||||
with open(pandora_js, 'w') as f:
|
||||
f.write(data)
|
||||
|
||||
print 'write', pandora_json
|
||||
|
|
Loading…
Reference in a new issue