From f8398238a9747103e684d60a80539604462bb915 Mon Sep 17 00:00:00 2001 From: Priyank Patel Date: Mon, 23 Jul 2018 18:41:48 +0000 Subject: [PATCH] webpack: Migrate archive bundle to webpack. Tested by visiting localhost:9991/archive/streams/1/topics/denmark3. --- templates/zerver/archive/index.html | 2 +- tools/webpack.assets.json | 13 +++++++++++++ zproject/settings.py | 17 ----------------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/templates/zerver/archive/index.html b/templates/zerver/archive/index.html index eff9f5c9bb..9b5ce2176a 100644 --- a/templates/zerver/archive/index.html +++ b/templates/zerver/archive/index.html @@ -11,10 +11,10 @@ } - {{ minified_js('archive', csp_nonce)|safe }} {{ render_bundle('translations', attrs='nonce="%s"' % (csp_nonce)) }} {{ render_bundle('katex', attrs='nonce="%s"' % (csp_nonce)) }} {{ render_bundle('portico') }} + {{ render_bundle('archive') }} {{ render_bundle('archive-styles') }} {% endblock %} diff --git a/tools/webpack.assets.json b/tools/webpack.assets.json index 34287eb542..fea66aaeb6 100644 --- a/tools/webpack.assets.json +++ b/tools/webpack.assets.json @@ -3,6 +3,19 @@ "./node_modules/sorttable/sorttable.js", "./static/styles/activity.scss" ], + "archive": [ + "./node_modules/xdate/src/xdate.js", + "./node_modules/perfect-scrollbar/dist/perfect-scrollbar.js", + "./node_modules/handlebars/dist/handlebars.runtime.js", + "./static/js/archive.js", + "./static/js/colorspace.js", + "./static/js/floating_recipient_bar.js", + "./static/js/timerender.js", + "./static/js/templates.js", + "./static/js/stream_color.js", + "./static/js/scroll_bar.js", + "./static/templates/compiled.js" + ], "portico": [ "./static/js/portico/header.js", "./static/styles/portico-styles.scss" diff --git a/zproject/settings.py b/zproject/settings.py index 77c48225f4..3299d5c5ac 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -927,23 +927,6 @@ JS_SPECS = { ], 'output_filename': 'min/zxcvbn.js' }, - # This is used for displaying archives. - 'archive': { - 'source_filenames': [ - 'js/archive.js', - 'js/colorspace.js', - 'js/floating_recipient_bar.js', - 'js/timerender.js', - 'node_modules/handlebars/dist/handlebars.runtime.js', - 'js/templates.js', - 'js/stream_color.js', - 'js/scroll_bar.js', - 'node_modules/xdate/src/xdate.js', - 'node_modules/perfect-scrollbar/dist/perfect-scrollbar.js', - 'templates/compiled.js', - ], - 'output_filename': 'min/archive.js' - }, } if DEVELOPMENT: