-
Notifications
You must be signed in to change notification settings - Fork 134
Add a Grunt action to set GP_SCRIPT_DEBUG to false when we deploy to wporg #1697
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
Conversation
akirk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this?
Co-authored-by: Alex Kirk <[email protected]>
Co-authored-by: Alex Kirk <[email protected]>
Co-authored-by: Alex Kirk <[email protected]>
The dash introduced with the new name causes problems executing the Grunt task, so we need to add these single quotation marks
With the dash in the Grunt action name, I have problems running the task in my local machine, so I have added single quotation marks to this action name. |
akirk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Problem
When we deploy a new version to wporg, we need to minify the CSS and the JavaScript tiles.
GP_SCRIPT_DEBUGconstant to load the unminified CSS and JavaScript files by default, setting thisGP_SCRIPT_DEBUGconstant totruein the glotpress.php file.But we need to change the
GP_SCRIPT_DEBUGconstant tofalsebefore we deploy to wporg, so the wporg release will use the minified files (except the end user will use theSCRIPT_DEBUGset totrue). This PR address this problem.Fixes #1587.
Solution
This PR adds:
define( 'GP_SCRIPT_DEBUG', true );todefine( 'GP_SCRIPT_DEBUG', false );in the glotpress.php file. Gruntfile.js file.Testing Instructions
To test this PR:
grunt replace:updateGPScriptDebugConstcommand.npm run updateGPScriptDebugConstcommand.In both situations, you can check that the
GP_SCRIPT_DEBUGvalue in theglotpress.phpfile has changed from true to false.