secure-77 / Perlite

A web-based markdown viewer optimized for Obsidian
https://perlite.secure77.de/
MIT License
968 stars 81 forks source link

Update composer.json, move lib files to src folder #101

Closed selfiens closed 11 months ago

selfiens commented 11 months ago

Related to #67

This PR has been made possible thanks to the incorporation of the composer in version 1.5.5 (dfa8fedeca451).

The primary changes in this PR are:

I have a few concerns to share:

Thanks for taking the time to review. I appreciate your insights and I'm keen to discuss and incorporate any feedback.

secure-77 commented 11 months ago

Thanks for the PR, not sure if I can merge it since I have already made some changes in the files in the DEV Branch, I need to add some instruction, that PRs should be done against the DEV Branch to adjust them to the current development status.

One question because it seems you have some experience in this field:

How to manage the JS dependencies? I used php composer but it's a mess, first it downloads too much stuff (I just need some files from the dist folders) and now it also has some conflicts between child dependencies of two dependencies. I don't want or need these child dependencies either, because I won't build the packages. Is there a way to tell composer only to download the wanted files instead of the whole package or is there generally another good approach how to manage this?

My current solution is, that I removed mermaid from composer and load it directly from a CDN because some child dependencies have a conflict with Katex dependencies.

selfiens commented 11 months ago

Thanks for the PR, not sure if I can merge it since I have already made some changes in the files in the DEV Branch, I need to add some instruction, that PRs should be done against the DEV Branch to adjust them to the current development status.

One question because it seems you have some experience in this field:

How to manage the JS dependencies? I used php composer but it's a mess, first it downloads too much stuff (I just need some files from the dist folders) and now it also has some conflicts between child dependencies of two dependencies. I don't want or need these child dependencies either, because I won't build the packages. Is there a way to tell composer only to download the wanted files instead of the whole package or is there generally another good approach how to manage this?

My current solution is, that I removed mermaid from composer and load it directly from a CDN because some child dependencies have a conflict with Katex dependencies.

Oh, that's my bad. I was not aware of the dev branch. I'll close this PR and see what I can do.

I've no experience using composer for anything other than managing PHP packages. I assume other usages might complicate things.

Since this project does not involve JS compiling/bundling, placing static JS library files in a web assets path and loading them with <script> tags seems natural and straightforward. Using CDNs is also straightforward.

secure-77 commented 11 months ago

No problem, feel free to create a new on the dev branch and thanks for the info about the JS files, I will think about to include them all via CDNs