(support request)

What, if any are the drush commands for this module?

I would like to be able to use drush to toggle the "minified Source HTML" option to On or Off using drush.

This will be used in a shell script that moves a site from staging to production and uses drush to turn on this option in the script for the production site.

The goal is to be able to automating configuration of all the settings at the following admin page, from within a shell script using drush commands.

{site}/admin/config/development/performance

Comments

websiteworkspace created an issue. See original summary.

slydevil’s picture

Drupal 8:

The minify flag is part of the system.performance configuration object.

Turn it on:
drush cset system.performance minifyhtml.minify_html 1

Turn it off:
drush cset system.performance minifyhtml.minify_html 0

Drupal 7:

The minify flag is stored in the variables table.

Turn it on:
drush vset minifyhtml_minify 1

Turn it off:
drush vset minifyhtml_minify 0

I have not tested these commands. Once I do, I will add them to the readme/help of the module.

slydevil’s picture

Status: Active » Needs review
websiteworkspace’s picture

Thanks so much for this documentation.

I will test these commands too, and report the results.

Addition of this information to the module readme file would probably help numerous other user of it.

--

I am also trying to track down all the related drush commands for the other settings that appear on the following drupal admin page:

{site}/admin/config/development/performance

My goal is to be able to run a shell script to apply these settings when a D8 site gets pushed from staging to production.

Any pointers on where to find the drush commands for the other settings on that page would be greatly appreciated.

--

slydevil’s picture

Status: Needs review » Needs work

Add drush commands to readme

slydevil’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
Assigned: Unassigned » slydevil

  • 1261de2 committed on 7.x-1.x
    Issue #3046329 by slydevil: minifyhtml - what are the drush commands
    
slydevil’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

  • 3e13865 committed on 8.x-1.x
    Issue #3046329: minifyhtml - what are the drush commands
    
slydevil’s picture

Status: Needs work » Fixed

  • slydevil authored a042701 on 7.x-1.x
    Issue #3046329 by slydevil: minifyhtml - what are the drush commands
    
slydevil’s picture

Status: Fixed » Closed (fixed)
websiteworkspace’s picture

The drush command documented above does not work:

running "drush -n -y cset system.performance minifyhtml.minify_html 1"

returns the output:


minifyhtml.minify_html key does not exist in system.performance config. 

Also, there isn't a drush command to toggle the "Strip comments from the source HTML" option either.