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

Do not run the babel helper in Development Mode. #224

Merged
merged 2 commits into from
May 19, 2021

Conversation

tmeyer2115
Copy link
Collaborator

This PR adds a check to the babel helper to see if we are currently in the Development Mode. If
so, the enclosed source code is not run through Babel, it is returned verbatim. This is a preview
optimization, since the Babel-ification is a relatively slow operation. It's not necessary for
preview either, assuming devs are not previewing their changes in IE11.

J=SLAP-1312
TEST=manual

Ensured that when in Development mode, the helper was a simple pass-through. In Production mode,
the enclosed code was Babel-ified.

This PR adds a check to the `babel` helper to see if we are currently in the Development Mode. If
so, the enclosed source code is not run through Babel, it is returned verbatim. This is a preview
optimization, since the Babel-ification is a relatively slow operation. It's not necessary for
preview either, assuming devs are not previewing their changes in IE11.

J=SLAP-1312
TEST=manual

Ensured that when in Development mode, the helper was a simple pass-through. In Production mode,
the enclosed code was Babel-ified.
@tmeyer2115 tmeyer2115 requested review from oshi97 and cea2aj May 19, 2021 13:35
@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 46.379% when pulling 19df066 on dev/optimize-babel-helper into 08570c2 on feature/optimize-babel-helper.

@cea2aj
Copy link
Member

cea2aj commented May 19, 2021

If someone does want to test the page in IE11, then they will need to publish to staging, correct?

@tmeyer2115
Copy link
Collaborator Author

If someone does want to test the page in IE11, then they will need to publish to staging, correct?

Correctomundo

@tmeyer2115 tmeyer2115 merged commit d8791c2 into feature/optimize-babel-helper May 19, 2021
@tmeyer2115 tmeyer2115 deleted the dev/optimize-babel-helper branch May 19, 2021 20:10
tmeyer2115 added a commit that referenced this pull request May 19, 2021
This PR adds a check to the `babel` helper to see if we are currently in the Development Mode. If
so, the enclosed source code is not run through Babel, it is returned verbatim. This is a preview
optimization, since the Babel-ification is a relatively slow operation. It's not necessary for
preview either, assuming devs are not previewing their changes in IE11.

J=SLAP-1312
TEST=manual

Ensured that when in Development mode, the helper was a simple pass-through. In Production mode,
the enclosed code was Babel-ified.
@oshi97 oshi97 mentioned this pull request Aug 24, 2021
oshi97 added a commit that referenced this pull request Aug 24, 2021
* Do not run the babel helper in Development Mode. (#224) (#225)
* Use npmlog for logging with colors (#228)
* Add Jambo build validation hook (#229)
* Added acceptance testing framework + tests 
* add --globs param to `jambo extract-translations` (#233) 
* Pass partials to templatedatavalidator (#237)
* `jambo upgrade` no longer deletes the themes folder if there is an error when git checkout-ing the new branch (#235)
* Update canonicalizeLocale to handle 中文(chinese) (#239)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants