Skip to content

Latest commit

 

History

History
104 lines (88 loc) · 4.69 KB

File metadata and controls

104 lines (88 loc) · 4.69 KB

TODO

  • ◊span[{:class "author"}]{jyn}

  • ◊tag['span {:class "author"}]{jyn}

  • want to implement preprocessors before writing the docs site so i don't need double-escaping

  • test all subcommands exhaustively, assert that i have tested them all

  • don't bind locals for transformers, only for pages (allows ns)

  • turn render-page into a transformer

    • calls flower/render-file by default
    • can use flower.unsafe/process for other langs
      • works as a "runner", can use the same transformer for many different transformers
    • gives us fewer caching points but that's fine, don't do dumb things that make builds slow
  • https://github.com/noprompt/garden for CSS generation

  • reload vfs itself when flower changes using ninja

  • custom merge isn't that hard https://github.com/mystor/git-revise/blob/main/gitrevise/merge.py

  • write lots of tests

    • test in CI that scripts/clean-build.sh works
    • pprint
    • repl works without warnings
    • can build jyn.dev
    • incremental builds do nothing if no file has changed
    • incremental builds rebuild if necessary
  • auto-escaping with hiccup.util/escape-html

  • hiccup syntax is ok for embedded clojure, but it would be nice to have a simpler standalone syntax based on css selectors

  • prelude module? maybe inject (eval "expressions/prelude.clj")?

  • allow configuring build dirs in flower.edn

  • file watcher should cancel existing ninja processes if a new input is changed

  • generated build.ninja can't handle file deletes

    • probably i can avoid this by deleting all the outputs of ninja -t query <deleted file>
  • watch tries to rebuild if an intermediate file was rebuilt.

    • get a list of all outputs of the modified file and ignore them if they happen within a ~second of a completed build? unsure
    • debouncing will help probably
  • nice syntax over ninja phony targets so you have some equivalent of --drafts

    • build/generate lets you pass :task "drafts" for each :build, defaults to "default"
    • note that ninja -t browse defaults to all. hm.
  • flower emojis

  • bundle asciidoc; suggest for highly nested md->clj->md->clj

  • render needs to not blindly assume that the preprocessing language is clojure

  • bundle jinja by default

  • dependencies between index pages and rendered pages

    • if we want "leads", they need to depend on contents also
      • actually wait depfiles solve this owo
    • if we want titles, we need them to be frontmatter

ideating

  • have a 7 line outline for defaults/build.clj

  • define an order for transforms

    • defined in build.clj, defaults to alphabetical
    • uses normal file extensions to determine how to run the transformer
    • default function runs embed first
    • very very simple to modify order, just a static list
    • warn if a transformer is missing from the list
  • preprocessors are different from templates and transforms because they have a fixed point algorithm with templates

  • preprocessors are clojure files with a unified interface (def transform)

    • add flower.unsafe/process, asks you what the deps are
  • render needs a mapping between language and preprocessor

    • can generate a JSON file in .ninja or something

"magic should only be for things you almost certainly want"

  • build.clj can be much simpler now that there's a unified api
  • "build.ninja is mostly for custom commands"

goodies