rethought how fingerprinting should work
This commit is contained in:
parent
e03bd6c2ef
commit
cb0cfebae3
1 changed files with 2 additions and 1 deletions
|
|
@ -72,7 +72,6 @@ buildRules = do
|
||||||
assets
|
assets
|
||||||
postsRule
|
postsRule
|
||||||
rss
|
rss
|
||||||
-- TODO: add rules for specifically the checksummed files which depend on the non-checksummed files
|
|
||||||
css_resources
|
css_resources
|
||||||
js_resources
|
js_resources
|
||||||
|
|
||||||
|
|
@ -87,12 +86,14 @@ css_resources :: Rules ()
|
||||||
css_resources =
|
css_resources =
|
||||||
map (outputDir </>) cssGlobs |%> \target -> do
|
map (outputDir </>) cssGlobs |%> \target -> do
|
||||||
src <- Shake.readFile' $ FP.dropDirectory1 target
|
src <- Shake.readFile' $ FP.dropDirectory1 target
|
||||||
|
-- TODO: write to fingerprinted location as well
|
||||||
Shake.writeFileChanged target $ CSS.minify src
|
Shake.writeFileChanged target $ CSS.minify src
|
||||||
|
|
||||||
js_resources :: Rules ()
|
js_resources :: Rules ()
|
||||||
js_resources =
|
js_resources =
|
||||||
map (outputDir </>) jsGlobs |%> \target -> do
|
map (outputDir </>) jsGlobs |%> \target -> do
|
||||||
src <- Shake.readFile' $ FP.dropDirectory1 target
|
src <- Shake.readFile' $ FP.dropDirectory1 target
|
||||||
|
-- TODO: write to fingerprinted location as well
|
||||||
Shake.writeFileChanged target $ JS.minify src
|
Shake.writeFileChanged target $ JS.minify src
|
||||||
|
|
||||||
-- there's probably a better way of doing this that allows for the target's origin file extension to get passed in but for now we're doing brute force
|
-- there's probably a better way of doing this that allows for the target's origin file extension to get passed in but for now we're doing brute force
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue