-
-
Notifications
You must be signed in to change notification settings - Fork 63
Clarify main.ts vs main.js #6
Description
(First, let me apologise for posting Issues rather than PRs - I’m on an iPad reading your wonderful docs, and am not in a place where I can learn the file format to contribute text and the required style - but I wanted to capture fleeting-but-hopefully-useful thoughts as I had them)
Background
As I understand it, .ts files get compiled to .js files…
Ah yes, you mention this in “Create your first plugin” - using npm run dev
Several things are not totally clear to me, or occur to me…:
- whether that command needs to be run every time the .ts is edited, or whether it is automatic
- Whether all novices will understand the need to edit the .ts not the .js (especially as the linked video at the top of that page shows someone manually downloading and edited the .js file.)
- I note that the hot-reload plugin monitors the .js not the .ts
Thoughts
I wonder whether it’s worth this page - https://marcus.se.net/obsidian-plugin-docs/getting-started/development-workflow - having some explanation that it’s the .ts you edit, and what you need to do to make sure the .js is uptodate every time you test your change… It seems fairly core to the development workflow understanding…
(I appreciate there may be a later page explaining the release process, and how the .js is created…)