Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to create non-minimized javascript files #398

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Jun 12, 2023

To make debugging of the generated javascript possible, we need to allow
to set minimize: false in the webpack.config.js file. Unfortunately
this has some problems:

  • The non-minimized javascript templates includes some stuff that causes
    jinja2 to freak out because it tries to interpolate the contents.
  • The order of declaration of some classes is wrong and it fails to
    create some objects at import time.

To help with this, add a new globally available function in the jinja
templates that allows us to include files without interpolating them and
fix the order-of-definition problems.

To make debugging of the generated javascript possible, we need to allow
to set `minimize: false` in the webpack.config.js file. Unfortunately
this has some problems:

* The non-minimized javascript templates includes some stuff that causes
  jinja2 to freak out because it tries to interpolate the contents.
* The order of declaration of some classes is wrong and it fails to
  create some objects at import time.

To help with this, add a new globally available function in the jinja
templates that allows us to include files without interpolating them and
fix the order-of-definition problems.

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pablogsal pablogsal enabled auto-merge (squash) June 12, 2023 13:02
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.31 ⚠️

Comparison is base (c2c8d53) 85.41% compared to head (2c0c57a) 85.11%.

❗ Current head 2c0c57a differs from pull request most recent head af53113. Consider uploading reports for the commit af53113 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #398      +/-   ##
==========================================
- Coverage   85.41%   85.11%   -0.31%     
==========================================
  Files          29       29              
  Lines        3621     3621              
==========================================
- Hits         3093     3082      -11     
- Misses        528      539      +11     
Flag Coverage Δ
cpp 85.11% <ø> (-0.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pablogsal pablogsal merged commit f9390a3 into bloomberg:main Jun 12, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants