Coder Social home page Coder Social logo

Comments (3)

TfTHacker avatar TfTHacker commented on June 9, 2024 1

Oh, sorry! I misunderstood. Obsidian won't download other files, so you need to figure out how to include that in another way. I would include the template in your code.

I wish you success in your dev efforts!

from obsidian42-brat.

TfTHacker avatar TfTHacker commented on June 9, 2024

Hi Ben, I am glad to hear from you. When I developed BRAT, at that time I learned that Obsidian only downloads three files from the published package on your repo:

  • manifest.json
  • main.js
  • styles.css

all other files are ignored. I don' think that changed. (Correct me if I am wrong).

What you want to do is include your dependency on handlebars so it gets built into your main.js.

You can see for example in another plugin I developed the include of a third party library:
https://github.com/TfTHacker/obsidian42-strange-new-worlds/blob/44fb0d9f9cfd8ca01369e99ac137f32d2b9679aa/package.json#L27

Hope this helps.

from obsidian42-brat.

benr77 avatar benr77 commented on June 9, 2024

Thanks for your response. I think you are correct and that these three files are the only ones to be downloaded.

However, I was actually talking about a Handlebars template file, not the Handlebars library itself. The library is in my package.json but gets compiled in to the outputted main.js so that's fine. But I want to ship an example, default template file that can be used if the user does not define their own.

I'm wondering if I should just include this template directly in the source code, so it ends up in main.js instead of trying to read it from disk. I guess the other option would be to write it to disk on plugin load (if it does not already exist).

Any thoughts on this?

Thanks

from obsidian42-brat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.