obsidian-calendar-plugin icon indicating copy to clipboard operation
obsidian-calendar-plugin copied to clipboard

Modernize #1: {P,}NPM Workspace-ify obsidian-{calendar-plugin, calendar-ui, daily-notes-interface} for saner continuing dev

Open donaldguy opened this issue 8 months ago • 0 comments

I started (i.e. spent all Wednesday night) working with the 2.0-beta stuff but decided to jump back to start with what works (then maybe look to re-base over whats worth keeping).

Note: for now pulled the pin on obsidian back to 0.12.0 (and not further as 0.11.X makes this version of tsc angry)

Herein find 2-4 actual logical changes:

  1. [8f381cf] = git subtree add --prefix=packages/daily-notes-api https://github.com/liamcain/obsidian-daily-notes-interface 97f4c8e47c1dffeed640f2cdc96fe7849edec532 (i.e. v0.9.0 ; .1 - .4 to follow as makes sense)

  2. [b26fb15] = git subtree add --prefix=packages/ui https://github.com/liamcain/obsidian-calendar-ui.git 03ceecbf6d88ef260dadf223ee5e483d98d24ffc (i.e. 0.3.12)

    Both of those could be squashed down if you support premise but not pulling over full histories

  3. [aa3543d] = rip out Yarn v1 in favor of dealer's choice of:

    • NPM > 7.0 (tested w/ 10.8.1)
    • PNPM 9.3.0 ;

    pointedly things which support workspaces of packages. (I started on using Yarn >= 2 (berry) but honestly, I don't see a point unless you have strong Meta-loyalty)

  4. [b9e7c53] = make sufficient to get started[^1]: A) clone repo (into .obsidian/plugins of a vault) & B) npm install (or pnpm install)

    • reconfigure the obsidian-daily-notes-interface build to just use tsc to emit dist/mjs/*.js with corresponding .ts.ds and .ts.d.maps
      • this better satisfies an otherwise angry local-linked build of -ui
      • have the rollup (still) translate that into a mapped but un-typed bundle.cjs set as main for the holdouts, if any
    • put build (and rollup) prepare hooks on the two sub-packages

More commits to follow

[^1]: generate a working main.js equivalent to current published plugin (1.5.10)

donaldguy avatar Jun 15 '24 00:06 donaldguy