From 97e798d44b3632e10d4e1e1f7ac4e827ac36bcc7 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Thu, 29 Dec 2022 15:15:37 +0100 Subject: [PATCH] add NPM instructions Signed-off-by: Sam Therapy --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d17b294..f10b9e9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,27 @@ Compatible with Mastodon, Misskey, and Pleroma. ## Usage -Download prebuilt binaries from [here](https://git.froth.zone/sam/js-feditoken/releases/latest) (currently supports x86_64 and arm64 on Linux [glibc or musl], macOS and Windows), or build from source. +Download prebuilt binaries from [here](https://git.froth.zone/sam/js-feditoken/releases/latest) (currently supports x86_64 and arm64 on Linux [glibc or musl], macOS and Windows), download from NPM, or build from source. + +### NPM + +1. Set up using the [Gitea registry](https://git.froth.zone/sam/fediverse-imagebot/packages) + + ```sh + npm config set @froth:registry https://git.froth.zone/api/packages/sam/npm/ + ``` + +2. After setting up the registry, either run it once + + ```sh + npx --package=@froth/feditoken feditoken + ``` + + or install globally + + ```sh + npm i -g @froth/feditoken + ``` ### Running from Source