shake-minify-0.1.4: Shake Minify Rules

Safe HaskellNone
LanguageHaskell2010

Development.Shake.Minify

Description

Minify JS and CSS files using no external $PATH dependencies.

main :: IO ()
main = shakeArgs shakeOptions $ do
    want ["//*.min.js", "//*.min.css"]
    "//*.min.js"   *> minifyJs
    "//*.min.css"  *> minifyCss

Synopsis

Documentation

minifyJs Source

Arguments

:: FilePath

Desired minified JS files (ex: "//*.min.js")

-> Action () 

Given a .min.js path, find the .js file and minify it into the specified file name.

minifyJs' Source

Arguments

:: (FilePath -> FilePath)

Given a target minified JS file path, return the source JS file path.

-> FilePath

Desired minified JS file (ex: "//*.min.js")

-> Action () 

Same as minifyJs except take a function for custom file path mapping.

minifyCss Source

Arguments

:: FilePath

Desired minified CSS file (ex: "//*.min.css")

-> Action () 

Given a .min.css path, find the .css file and minify it into the specified file name.

minifyCss' Source

Arguments

:: (FilePath -> FilePath)

Given a target minified CSS file path, return the source CSS file path.

-> FilePath

Target minified CSS file (ex: "//*.min.css")

-> Action () 

Same as minifyCss except take a function for custom file path mapping.