Problem Setting Up a Plugin Development Environment

43 views
Skip to first unread message

msh

unread,
May 13, 2023, 4:23:09 AM5/13/23
to zotero-dev
I'm trying to set up a plugin development environment using the tutorial below:

However, I have two problems:
- I don't know how "the absolute path to the root of your plugin" should be formatted. Suppose I have the plugin in folder "D:\plugins\d...@d.com". What should be the content of my d...@d.com text file?
-  I don't have a bootstrap.js in my plugin. Is it necessary to include it in the plugin folder? What should it contain?

Emiliano Heyns

unread,
May 13, 2023, 8:23:40 PM5/13/23
to zotero-dev
I have a Yeoman generator (https://github.com/retorquere/generator-zotero-plugin) that will scaffold everything based on the make it red scaffold from Zotero (https://github.com/zotero/make-it-red). It will generate either the src-1.2 or the src-2.0 environment (I can add 1.1 if desired). It has everything to build and publish the plugin, but it does use typescript.

XY Wong

unread,
May 14, 2023, 12:07:12 PM5/14/23
to zotero-dev
1. Yes. In 'D:\path\to\your\plugin\root\folder' if you are using Windows. Don't forget to exit Zotero before editing the profile and remove the specified lines in the prefs.js before you start Zotero again.

2. Besides the generator kindly provides by Emiliano, an alternative choice would be the plugin template: https://github.com/windingwind/zotero-plugin-template. Fork, clone, `npm install` and `npm run build`. That's all.
You could take a look at these repos, as well as the official make-it-red example.

Some real-world plugin examples of mine:


Reply all
Reply to author
Forward
0 new messages