Common practice with .js
and .css
file minification is to create .min.js
and .min.css
files. The problem is Shake FilePatterns will match both minified and non-minified files with this scheme with a pattern like //*.js
. The docs seem to recommend making unique extensions for each like reg.js
and min.js
but I'm not sure this is a path I want to take. How can this be worked around in Shake?
Edit: The problem is with using getDirectoryFiles
:
js <- getDirectoryFiles "" ["//*.js"]
let jsMins = map (-<.> "min" <.> "js") js
need jsMins
There's a target for "//*.min.js
that works just fine but getDirectoryFiles "" ["//*.js"]
starts picking up the generated .min.js
files.