JSPM

  • Created
  • Published
  • Downloads 1544
  • Score
    100M100P100Q118573F
  • License MIT

Toolkit for Zotero plugins

Package Exports

  • zotero-plugin-toolkit
  • zotero-plugin-toolkit/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zotero-plugin-toolkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Zotero Plugin Toolkit

Intro

This repo is published as an NPM package zotero-plugin-toolkit, which provides useful APIs for Zotero plugin developers.

API Documentation

Usage

  1. Run npm install --save zotero-plugin-toolkit.

  2. Import the toolkit class

import ZoteroToolkit from "zotero-plugin-toolkit";
// Alternatively, import class you need
// import { ZoteroCompat, ZoteroTool, ZoteroUI } from "zotero-plugin-toolkit"
const toolkit = new ZoteroToolkit();
  1. Use the toolkit following this API Documentation
const Zotero = toolkit.Compat.getZotero();

This repo depends on zotero-types. See its hompage for more details about Zotero type definitions.

Examples

This package is integrated into the Zotero Addon Template. You can find examples there.

If you are new to Zotero plugins/looking for solutions to migrate from Zotero 6 to 7, please take a look at that repo.

The API documentation also contains example code for some APIs.

Contributing

Setup

  1. Fork this repo.

  2. Make sure you have nodejs and npm installed. Clone the repo folder and install dependencies:

git clone https://github.com/windingwind/zotero-plugin-toolkit
cd zotero-plugin-toolkit
npm install
npm install -g @microsoft/api-extractor
npm install -g @microsoft/api-documenter

Build

Run npm run build.

  • Package .js and .d.ts under ./dist;

  • Documentations under ./docs.

Release

Run npm run release.

Disclaimer

Use this code under MIT License. No warranties are provided. Keep the laws of your locality in mind!

If you want to change the license, please contact me at wyzlshx@foxmail.com

My Zotero Plugins