This is an npm package designed to assist in the development of Zotero plugins. It provides features such as compiling plugins, starting Zotero and installing plugins from source code, reloading plugins when the source code changes, and releasing plugins, and so on.
Initially, the code of this package was part of the zotero-plugin-template repository. To allow downstream developers to easily stay up-to-date, we have abstracted these scripts into a standalone npm package.
This project is under active development, and some APIs may change. However, it is ready for production and has been used in several projects.
For best practices regarding this package, please refer to zotero-plugin-template.
# Git Clone
git clone https://github.com/northword/zotero-plugin-scaffold.git zotero-plugin-scaffold
cd zotero-plugin-scaffold/
# Install deps
pnpm install
# Development Mode
# This command creates a typescript runtime using jiti,
# and the modified code does not need to be built again.
pnpm run dev
# link local scaffold to your plugin
cd your-plugin-work-dir/
pnpm link ../zotero-plugin-scaffold
cd zotero-plugin-scaffold/
Now you can make changes to Scaffold and test them in your plugin.
When you're done modifying, make sure that you can pass the build and that the code style meets the requirements of this repository.
# Build
pnpm run build
# ES Lint
pnpm run lint:fix
GNU Affero General Public License Version 3.
This project references the design and code of the Zotero Plugin Template.
This project would not be possible without the support of the open source community.