devatherock / minify-js

Minify html, javascript and css files.
https://github.com/marketplace/actions/html-css-js-minifier
MIT License
10 stars 2 forks source link

Anyway to only target certain files for minifying? #5

Closed t3pfaffe closed 9 months ago

t3pfaffe commented 1 year ago

Would like to be able to specify it only minifying certain files in my assets directory. Is this possible? Maybe as a filter built into the directory parameter since the action seems to just be using the find command?

devatherock commented 9 months ago

This should now be possible with a config like below:

steps:
  - name: HTML/CSS/JS Minifier
    uses: docker://devatherock/minify-js:3.0.0
    with:
      directory: 'path/to/assets'
      inclusions: |-
        .*scripts.js.*
        .*static/index.html.*