ryanjamurphy / review-obsidian

Add the current note to a future daily note to remember to review it.
142 stars 8 forks source link

Build broken "Property 'plugins' does not exist on type 'App' #20

Closed trydalch closed 3 years ago

trydalch commented 3 years ago

I'm not sure how this plugin even works, as the build seems to be broken, and it's referencing properties and methods that are non-existent on the obsidian api.

Am I doing something wrong?

ryanjamurphy commented 3 years ago

It would help if you described what was broken about it. Did you install it from the community plugins?

And yes, it is using some unpublished parts of the API.

ryanjamurphy commented 3 years ago

Wait, I just reread your topic here. Why are you downloading it and building it from source?

To install and use plugins, use the community plugin gallery in-app. If you for some reason want to download it straight from GitHub, you only need main.js and manifest.json.

trydalch commented 3 years ago

I'm working on my own plugin, and was interested in learning how you leveraged other plugins. So I cloned it to build and play around with to learn.

How do you find & use unpublished parts of the API?

ryanjamurphy commented 3 years ago

Ah, that makes more sense. Fun!

The same thing you're already doing—finding other plugins that have done so. You can also explore what the app contains by using console.log(object) and then inserting interesting objects, like, well, this.app. You can explore what those objects are and what they include, and some of them can then be used in plugin development.

Disclaimer: I am a terrible programmer, so there are probably better ways of explaining the above.