do-me / SemanticFinder

SemanticFinder - frontend-only live semantic search with transformers.js
https://do-me.github.io/SemanticFinder/
MIT License
210 stars 14 forks source link

Organize by files + use installed deps instead of cdn #6

Closed lizozom closed 1 year ago

lizozom commented 1 year ago

Great work on the project! Not sure if this PR aligns with the One HTML-file only that can run anywhere. goal, but I still wanted to offer these changes. Let me know if you want to keep only part of them and I can adjust the PR.

do-me commented 1 year ago

This is pretty awesome, thanks for the PR! I was reconsidering the "one-file" decision anyway so your PR came just at the right time!

The original motivation was that people could download the file to their disk and run everything offline there for privacy. However, I never found the time to bundle all dependencies properly anyway, so it was kind of pointless. Instead, it would make more sense to either educate users (private browsing mode, switching off internet connection after loading, closing tab and if necessary deleting history) or provide some kind of minimal standalone app where everything is properly (and conveniently) bundled. I'll add this on the feature/idea list. Any ideas more than welcome :)

Let me just check that everything is working fine and I'll merge the PR.

Just pinging @VarunNSrivastava so you know what's in the pipeline.

do-me commented 1 year ago

Just tested, works fine and very convenient to set up! A few notes:

  1. Apparently, there are some failed requests. Do you know where they could be coming from? 

  1. Maybe it would be good to create a  js and css folder to clean up the structure a little.

Thank you very much for the PR!  

lizozom commented 1 year ago

I'll take a look and make a follow up. 👍🏻

do-me commented 1 year ago

Thanks a lot! I'm updating the Readme meanwhile.

varunneal commented 1 year ago

What are we using to deploy from Webpack to github pages?

do-me commented 1 year ago

I just wrote a simple action that builds the files, pushes them to the gh-pages branch and deploys them: https://github.com/do-me/SemanticFinder/blob/main/.github/workflows/deploy.yml

I should remove the dist folder in the main branch though, as the gh-pages branch is exactly this. Or do you think it would be good to keep it there for convenience? Then we'd need to modify the action to automatically push the files in the dist folder too.