Commit Graph

4 Commits

Author SHA1 Message Date
Scott Feeney 0f734fad2b Don't generate minified_assets.json
The new minification process no longer needs it.

(imported from commit cd192120f74f58b10165807903b3318ae0a2c2b6)
2013-07-12 11:59:11 -04:00
Scott Feeney 2c33320746 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)
2013-07-12 11:59:04 -04:00
Scott Feeney 9ca7d58cac Create minified_assets.json in the deployment root
This file is a dict mapping filenames like "min/api.js" to
"min/api.HEX_HASH_HERE.js". This will be useful later for figuring out
which hashed version of a generated file belongs to a specific deploy,
for reuse in future deploys with the same source files.

(imported from commit d03c408b37a4e2d494abd4b1577a70b5ff5c2e34)
2013-06-24 15:55:04 -04:00
Zev Benjamin 33fed064e2 Prepend the minified static file header using a custom Storage class
(imported from commit 2b67a6d94de1693bdb8a91f455b92375692f4c41)
2013-06-12 17:46:38 -04:00