-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add a Grunt action to set GP_SCRIPT_DEBUG to false when we deploy to wporg #1697
Conversation
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.
|
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_DEBUG
constant to load the unminified CSS and JavaScript files by default, setting thisGP_SCRIPT_DEBUG
constant totrue
in the glotpress.php file.But we need to change the
GP_SCRIPT_DEBUG
constant tofalse
before we deploy to wporg, so the wporg release will use the minified files (except the end user will use theSCRIPT_DEBUG
set 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:updateGPScriptDebugConst
command.npm run updateGPScriptDebugConst
command.In both situations, you can check that the
GP_SCRIPT_DEBUG
value in theglotpress.php
file has changed from true to false.