Skip to content

Split into multiple packages #600

@srid

Description

@srid

Split the repo into an acyclic multi-package layout:

packages/
  emanote-route/      # pure route/path/url types
  emanote-source/     # Loc + source file pattern policy
  emanote-pandoc/     # Markdown parsing, tag syntax, generic renderer types
  emanote-model/      # notebook model, notes, links, queries, graph, tasks
  emanote/            # executable, CLI, Ema app, site routing, view, assets

Dependency graph:

emanote-route
emanote-source  -> emanote-route
emanote-pandoc  -> emanote-route
emanote-model   -> emanote-route, emanote-source, emanote-pandoc
emanote         -> emanote-model, emanote-pandoc, emanote-source, emanote-route

Boundary rules:

  • emanote-route: Route.Ext, Route.R, Route.ModelRoute, and pure SiteRoute.Type.
  • Keep SiteRoute.Class in emanote; it depends on model/view/Ema behavior.
  • Make SiteRoute.Type independent of Emanote.Pandoc.Markdown.Syntax.HashTag, using Data.TagTree or a tiny shared tag type instead.
  • Keep concrete resolving renderers (Renderer.Url, Renderer.Embed, Renderer.Query, Renderer.Callout) in emanote; move only generic Pandoc renderer plumbing to emanote-pandoc.
  • Move Model.Stork out of model or inject URL rendering, since it currently calls site URL logic.
  • Keep Emanote.Prelude app-local unless a tiny internal common package becomes clearly useful.

Phasing:

  1. Move ./emanote to ./packages/emanote.
  2. Extract emanote-route, fixing SiteRoute.Type.
  3. Extract emanote-source.
  4. Extract emanote-pandoc, leaving model-aware renderers behind.
  5. Extract emanote-model, after removing imports of SiteRoute.Class.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions