Conversation
| function gutenberg_script_debug() { | ||
| return ( | ||
| ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || | ||
| file_exists( gutenberg_dir_path() . '.git' ) |
There was a problem hiding this comment.
What if, in the course of development, I do want to test with minified souces? Switching on the existence of .git seems like a very inflexible method.
There was a problem hiding this comment.
The same is true if we set it in the Docker config: you'd need to edit the config.
There was a problem hiding this comment.
An environment variable seems the best option here; why not have MINIFY_JS, SCRIPT_DEBUG, or something else, be an env var we could check for?
| function gutenberg_script_debug() { | ||
| return ( | ||
| ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || | ||
| file_exists( gutenberg_dir_path() . '.git' ) |
There was a problem hiding this comment.
An environment variable seems the best option here; why not have MINIFY_JS, SCRIPT_DEBUG, or something else, be an env var we could check for?
|
Is there any way to move it forward? This PR got out of date but it would be awesome to find a way to enable this flag through Docker. |
|
You can do it by adding these lines to docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CLI config set WP_DEBUG true --raw --type=constant
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CLI config set SCRIPT_DEBUG true --raw --type=constant
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CLI config set WP_DEBUG_DISPLAY true --raw --type=constantLocation in the file doesn't matter, they just need |
|
I opened #14371 where I want to provide an option to override site constants through env variables. |
Description
When I setup Gutenberg for local development, I'd expect it to load unminified files.
How has this been tested?
Screenshots
Types of changes
Checklist: