Skip to content

Conversation

@tinpotnick
Copy link
Contributor

Submit a new Plugin to Marketplace

Plugin Github repo URL: <-----plugin-repo-link-here----->
https://github.com/tinpotnick/logseq-audiosnippet-plugin

Github releases checklist

  • a legal package.json file.
  • a valid CI workflow build action for Github releases. (theme plugin for this).
  • a release which includes a release zip pkg from a successful build.
  • a clear README file, ideally with an image or gif showcase. (For more friendly to users, it is recommended to have English version description).
  • a license in the LICENSE file.

@xyhp915
Copy link
Collaborator

xyhp915 commented Mar 19, 2025

Hi @tinpotnick . You made a very useful plugin! I just found that using index.js as the entry point has bug for the final Desktop version, so I created a PR to temporarily fix this issue. tinpotnick/logseq-audiosnippet-plugin#1

@tinpotnick
Copy link
Contributor Author

Hi @xyhp915 - thanks for the feedback. And - thanks for spotting the version number issue in package.json!

I have a few questions:

  1. What is the purpose of lsplugin.user.min.js?
  2. How is lsplugin.user.min.js built - I would want to ensure it is maintainable (I normally place a build command in package.json for this type of thing)
  3. I did come across Plugin doesn't work in non-devlopmet mode when the entry file is a JavaScript (JS) file. logseq#10117 - but it said it was resolved?
  4. Why are both index.js and the min included in the HTML

Sorry if these questions are obvious - I am on a rather steep learning curve on the logseq plugin architecture!

Thanks! Happy to merge once I understand these points.

@xyhp915
Copy link
Collaborator

xyhp915 commented Mar 19, 2025

Hi @tinpotnick Good questions!

  1. What is the purpose of lsplugin.user.min.js?

It's the user-side plugin sdk, which is used to communicate with logseq. It is necessary for plugin development. It's built from https://github.com/logseq/logseq/blob/master/libs/README.md

I did come across logseq/logseq#10117 - but it said it was resolved?

This bug is still present in the latest version (0.10.9). It has been fixed in the DB version.

Why are both index.js and the min included in the HTML

If you develop plugins without build tools (webpack, vite, etc.). I think this manual work is necessary.

@tinpotnick
Copy link
Contributor Author

tinpotnick commented Mar 19, 2025

@xyhp915 thanks for the explainer - is this the same as yarn add @logseq/libs and import "@logseq/libs" if the js is included as a module?

If so I would prefer to do that as it is more maintainable (or rather updatable).

@xyhp915
Copy link
Collaborator

xyhp915 commented Mar 20, 2025

@xyhp915 thanks for the explainer - is this the same as yarn add @logseq/libs and import "@logseq/libs" if the js is included as a module?

If so I would prefer to do that as it is more maintainable (or rather updatable).

Yes. It's reasonable! I think you might need a packaging tool similar to vite. You can refer to this plugin https://github.com/xyhp915/logseq-journals-calendar/blob/main/src/main.js#L1

@tinpotnick
Copy link
Contributor Author

@xyhp915 - thanks - I merged yours and then modified it to use esbuild - it works really well.

@xyhp915 xyhp915 merged commit 754640c into logseq:master Mar 22, 2025
1 check passed
@xyhp915 xyhp915 mentioned this pull request Apr 3, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants