-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize #1: {P,}NPM Workspace-ify obsidian-{calendar-plugin, calendar-ui, daily-notes-interface} for saner continuing dev #366
base: master
Are you sure you want to change the base?
Conversation
Support files in nested folders; add jest tests
* Also properly parse weekly formats with D{1,4} * Bump dependencies
… them (liamcain#10) * Properly check that periodic notes' settings are enabled before using them * Bump version 0.7.5 * Fix linting
* Use xor when parsing week dates with month day * Remove test.only
* Remove XOR * bump version
* Fix path join function * add tests; bump version
* Fix path join function * fix yarnlock
* Add math to templates * add default format for math * Bump version * Add quarters * use feature version
* Add math to weekly notes * bump deps
This seems to work same as 1.5.10 [after clone into `.obsidian/plugins` and `npm install` OR `pnpm install` ] (the final rollup "claims" it doesn't know where to find "obsidian-daily-notes-interface" at the typescript stage; [adding a moduleResolution: node to tsconfig surprisingly no help], but everything ends up in the output main.js) Note: pins back down to 0.12.0 of obsidian-api
package.json
Outdated
"scripts": { | ||
"lint": "svelte-check && eslint . --ext .ts", | ||
"build": "npm run lint && rollup -c", | ||
"postinstall": "npm run build --workspace=packages/daily-notes-api && npm run build --workspace=packages/ui", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is outmoded/removed by next commit in favor of package-local prepare
s
"obsidian-calendar-ui": "*", | ||
"obsidian-daily-notes-interface": "*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm provides the concept of a "workspace:^"
pin but as far as I can tell vanilla npm wants you to keep your tracking "normal"; its a matter of style imo
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 to0.12.0
(and not further as0.11.X
makes this version oftsc
angry)Herein find 2-4 actual logical changes:
[
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)[
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
[
aa3543d
] = rip out Yarn v1 in favor of dealer's choice of: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)
[
b9e7c53
] = make sufficient to get started1: A) clone repo (into.obsidian/plugins
of a vault) & B)npm install
(orpnpm install
)obsidian-daily-notes-interface
build
to just usetsc
to emitdist/mjs/*.js
with corresponding.ts.d
s and.ts.d.map
s-ui
bundle.cjs
set asmain
for the holdouts, if anyprepare
hooks on the two sub-packagesMore commits to follow
Footnotes
generate a working
main.js
equivalent to current published plugin (1.5.10) ↩