swapped to a single js and single css entrypoint and my brain hurts
This commit is contained in:
parent
b8064a8d3e
commit
8082f95491
4 changed files with 11 additions and 16 deletions
15
TODO.md
15
TODO.md
|
|
@ -1,12 +1,13 @@
|
|||
- [ ] minify js and css when copying over instead of just copying
|
||||
- CSS
|
||||
- https://github.com/wereHamster/haskell-css-syntax
|
||||
- JS
|
||||
- Doing our own tokenizer lol
|
||||
- [ ] swap from using `draft` to using `date` for determing draft status, lack of date = draft
|
||||
- Using ESBuild via an Oracle but figuring out where and how I want to use that oracle hurts my head
|
||||
- [ ] setup fingerprinting in file names for css and js
|
||||
- setup lambdas via: https://hackage-content.haskell.org/package/mustache-2.4.3.1/docs/Text-Mustache.html#v:overText
|
||||
- This may require a refactor of how we handle templates to use `object` instead of just using aeson integration from the mustache crate
|
||||
- [ ] Make a function which takes IR and spits out some kind of table of contents
|
||||
- [ ] Add rst or org support and convert markdown handling to custom parser instead of pandoc
|
||||
- [ ] Add in functionality for footnotes
|
||||
- [ ] swap from using `draft` to using `date` for determing draft status, lack of date = draft
|
||||
- [ ] Fix time via timestamps potentially meaning something (via preshim?) and use local offset instead of absolute time https://www.rfc-editor.org/rfc/rfc3339#section-4.2
|
||||
- [ ] process source code blocks to syntax highlight them
|
||||
- tree sitter https://hackage.haskell.org/package/tree-sitter
|
||||
- Alternatively do the Rust <-> Haskell binding myself
|
||||
|
|
@ -23,8 +24,4 @@
|
|||
- https://hackage-content.haskell.org/package/warp-3.4.10
|
||||
- https://hackage.haskell.org/package/file-embed
|
||||
- https://hackage.haskell.org/package/fsnotify
|
||||
- [ ] Make a function which takes IR and spits out some kind of table of contents
|
||||
- [ ] Add rst or org support and convert markdown handling to custom parser instead of pandoc
|
||||
- [ ] Add in functionality for footnotes
|
||||
- [ ] Fix time via timestamps potentially meaning something (via preshim?) and use local offset instead of absolute time https://www.rfc-editor.org/rfc/rfc3339#section-4.2
|
||||
- [ ] see if performance can be improved, it shouldn't be necessary but if I'm looking at doing something for this and everything above this got checked off then this is a sensible next thing
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ buildDir = ".psb"
|
|||
assetGlobs :: [String]
|
||||
assetGlobs = ["static//*", "robots.txt", "favicon.ico"]
|
||||
|
||||
-- this insanity is to avoid repetition
|
||||
-- this used to be useful but does nothing now
|
||||
resourceGlobs :: [String]
|
||||
resourceGlobs = jsGlobs ++ cssGlobs
|
||||
|
||||
|
|
@ -23,10 +23,10 @@ resourceHashPath :: FilePath -> FilePath
|
|||
resourceHashPath input = outputDir </> addExtension input ".hash"
|
||||
|
||||
jsGlobs :: [String]
|
||||
jsGlobs = prependResources $ liftA2 (++) ["js//*."] ["js", "mjs"]
|
||||
jsGlobs = prependResources $ ["js/entry.mjs"] -- prependResources $ liftA2 (++) ["js//*."] ["js", "mjs"]
|
||||
|
||||
cssGlobs :: [String]
|
||||
cssGlobs = prependResources $ liftA2 (++) ["css//*."] ["css"]
|
||||
cssGlobs = prependResources $ ["css/entry.css"] -- prependResources $ liftA2 (++) ["css//*."] ["css"]
|
||||
|
||||
-- CAN ONLY BE TYPST DOCS UNLESS YOU CHANGE THINGS AT THE `pages` RULE in `Main.hs
|
||||
pagePaths :: [String]
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ inlineText' disallow = choice [try $ strikethrough disallow, try $ bold disallow
|
|||
|
||||
strikethrough disallow = Crossed <$> (between' disallow (string "~~") (void $ string "~~") (inlineText' (disallow <|> (void $ string "~~"))))
|
||||
|
||||
-- TODO: bold and italic eat a lineEnding that they shouldn't for some reason
|
||||
bold disallow = Bold <$> (between' disallow (string "**") (disallow <|> (void $ string "**")) (inlineText' (disallow <|> (void $ string "**"))))
|
||||
|
||||
italic :: (HasCallStack) => Parser s m () -> Parser s m InlineText
|
||||
|
|
|
|||
|
|
@ -75,9 +75,10 @@ buildRules :: Rules ()
|
|||
buildRules = do
|
||||
home
|
||||
assets
|
||||
bundled
|
||||
postsRule
|
||||
rss
|
||||
bundled
|
||||
pure ()
|
||||
|
||||
-- css_resources
|
||||
-- js_resources
|
||||
|
|
@ -93,7 +94,6 @@ assets =
|
|||
-- css_resources =
|
||||
-- map (outputDir </>) cssGlobs |%> \target -> do
|
||||
-- src <- Shake.readFile' $ FP.dropDirectory1 target
|
||||
-- -- TODO: write to fingerprinted location as well
|
||||
-- Shake.writeFileChanged target $ CSS.minify src
|
||||
--
|
||||
-- js_resources :: Rules ()
|
||||
|
|
@ -101,7 +101,6 @@ assets =
|
|||
-- map (outputDir </>) jsGlobs |%> \target -> do
|
||||
-- let src_file = FP.dropDirectory1 target
|
||||
-- src <- Shake.readFile' $ src_file
|
||||
-- -- TODO: write to fingerprinted location as well
|
||||
-- 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue