You are here

README.txt in Minify JS 8

Same filename and directory in other branches
  1. 8.2 README.txt
  2. 7 README.txt
Description
===============================================================================

Minify JS was developed to replace the implementation of the Minify module
(https://www.drupal.org/project/minify) which has a couple of problems:

  1. Problem: It is not storing the minified versions of it's files in the
     public file system properly. This in turn will not allow other modules,
     such as the S3 File System module (https://www.drupal.org/project/s3fs),
     to work with it.

     Solution: This module uses the public file system exclusively and any
     module that uses it's own Stream Wrapper for the public file system will
     work with this module out of the box.

  2. Problem: The minification process is using a remote call to Closure
     Compiler which has a few limitations, specifically a limitation on the
     number of files it can minify in an hour and another preventing it from
     minifying the JS to a single line.

     Solution: This module uses the JSqueeze PHP class for it's minification
     (https://github.com/tchwork/jsqueeze) which does not have these
     limitations.

  3. Problem: The module only detected javascript files that were loaded on a
     page, which means that all pages would need to be visited to get a
     complete list of javascript files.

     Solution: This module scans the file directory for .js files (excluding
     .min.js files).

Installation
===============================================================================

  1. Composer install:
  
    composer require drupal/minifyjs

  2. Enable the Minify JS module, either through the UI or via drush:

    drush en minifyjs

  3. Go to the Performance page: Configuration > Performance.

    /admin/config/development/performance

  4. Click on the Manage Javascript Files tab.

    /admin/config/development/performance/js

  5. Bulk minify using the checkboxes or use the Operation links for individual
     minifications. Drush is also available to manage the functionality of the
     module:

    drush scan-js
    drush minify-js
    drush minify-js-skip

  6. Go to the Performance page: Configuration > Performance. Enable the
     minified files by using the checkbox called "Use Minified Javascript
     files."

    /admin/config/development/performance

  7. Manage the settings for the site:

    /admin/config/development/minifyjs

File

README.txt
View source
  1. Description
  2. ===============================================================================
  3. Minify JS was developed to replace the implementation of the Minify module
  4. (https://www.drupal.org/project/minify) which has a couple of problems:
  5. 1. Problem: It is not storing the minified versions of it's files in the
  6. public file system properly. This in turn will not allow other modules,
  7. such as the S3 File System module (https://www.drupal.org/project/s3fs),
  8. to work with it.
  9. Solution: This module uses the public file system exclusively and any
  10. module that uses it's own Stream Wrapper for the public file system will
  11. work with this module out of the box.
  12. 2. Problem: The minification process is using a remote call to Closure
  13. Compiler which has a few limitations, specifically a limitation on the
  14. number of files it can minify in an hour and another preventing it from
  15. minifying the JS to a single line.
  16. Solution: This module uses the JSqueeze PHP class for it's minification
  17. (https://github.com/tchwork/jsqueeze) which does not have these
  18. limitations.
  19. 3. Problem: The module only detected javascript files that were loaded on a
  20. page, which means that all pages would need to be visited to get a
  21. complete list of javascript files.
  22. Solution: This module scans the file directory for .js files (excluding
  23. .min.js files).
  24. Installation
  25. ===============================================================================
  26. 1. Composer install:
  27. composer require drupal/minifyjs
  28. 2. Enable the Minify JS module, either through the UI or via drush:
  29. drush en minifyjs
  30. 3. Go to the Performance page: Configuration > Performance.
  31. /admin/config/development/performance
  32. 4. Click on the Manage Javascript Files tab.
  33. /admin/config/development/performance/js
  34. 5. Bulk minify using the checkboxes or use the Operation links for individual
  35. minifications. Drush is also available to manage the functionality of the
  36. module:
  37. drush scan-js
  38. drush minify-js
  39. drush minify-js-skip
  40. 6. Go to the Performance page: Configuration > Performance. Enable the
  41. minified files by using the checkbox called "Use Minified Javascript
  42. files."
  43. /admin/config/development/performance
  44. 7. Manage the settings for the site:
  45. /admin/config/development/minifyjs