replaced Grunt with Webpack as front-end build tool
This commit is contained in:
parent
36ddba24ad
commit
2e133d2b9c
16 changed files with 222 additions and 481 deletions
|
@ -163,23 +163,11 @@ def _get_version_number():
|
|||
|
||||
def render_page_template(name, route_data=None, **kwargs):
|
||||
debugging = app.config.get('DEBUGGING', False)
|
||||
if debugging:
|
||||
# If DEBUGGING is enabled, then we load the full set of individual JS and CSS files
|
||||
# from the file system.
|
||||
library_styles = list_files('lib', 'css')
|
||||
main_styles = list_files('css', 'css')
|
||||
library_scripts = list_files('lib', 'js')
|
||||
# Ensure Webpack bundle is first script on page
|
||||
main_scripts = ['build/bundle.js'] + list_files('js', 'js')
|
||||
|
||||
file_lists = [library_styles, main_styles, library_scripts, main_scripts]
|
||||
for file_list in file_lists:
|
||||
file_list.sort()
|
||||
else:
|
||||
library_styles = []
|
||||
main_styles = ['dist/quay-frontend.css']
|
||||
library_scripts = []
|
||||
main_scripts = ['dist/quay-frontend.min.js']
|
||||
library_styles = []
|
||||
main_styles = []
|
||||
library_scripts = []
|
||||
main_scripts = ['build/quay-frontend.js']
|
||||
|
||||
use_cdn = app.config.get('USE_CDN', True)
|
||||
if request.args.get('use_cdn') is not None:
|
||||
|
|
Reference in a new issue