mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
Reuse minified JS from previous deploys
This is a big change affecting lots of areas: * Pipeline no longer deals with JS (though it still minifies CSS) * A new script, tools/minify-js (called from update-prod-static), minifies JavaScripts * A command-line argument --prev-deploy, if passed to minify-js or update-prod-static, is used to copy minified JS from a previous deploy (i.e., a previous git checkout), if the source files have not changed * update-deployment passes --prev-deploy * Scripts are now included with the minified_js template tag, rather than Pipeline's compressed_js Also, as a side benefit of this commit, our Handlebars templates will no longer be copied into prod-static/ and accessible in production. Unminification is probably broken, but, per Zev and Trac ticket #1377, it wasn't working perfectly before this change either. (Based on code review, this commit has been revised to: * Warn if git returns an error in minify-js * Add missing output redirects in update-prod-static * Use DEPLOY_ROOT instead of manually constructing that directory * Use old style formatting) (imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
This commit is contained in:
@@ -19,7 +19,7 @@ class LineToFile(object):
|
||||
self._cumulative_counts = []
|
||||
|
||||
total = 0
|
||||
for filename in settings.PIPELINE_JS['app']['source_filenames']:
|
||||
for filename in settings.JS_SPECS['app']['source_filenames']:
|
||||
self._names.append(filename)
|
||||
self._cumulative_counts.append(total)
|
||||
with open(path.join('zephyr/static', filename), 'r') as fil:
|
||||
|
||||
Reference in New Issue
Block a user