Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Clarify main.ts vs main.js #6

@claremacrae

Description

@claremacrae

(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…)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions