Core utilities used by PrivaNote
Before installing the packages, you need to have a GitHub token with read:packages
checked. You can create one here
Replace {GITHUB_TOKEN}
with your token in the first step of one of the following methods when setting the GITHUB_TOKEN env variable.
refer to: https://bun.sh/docs/install/registries
- Set the GITHUB_TOKEN in .env file in your project root:
echo "GITHUB_TOKEN={GITHUB_TOKEN}" >> .env
# Ensure .env is in .gitignore or run:
echo ".env" >> .gitignore
- Add privanote registry to bunfig.toml file in your project root:
# bunfig.toml - reads GITHUB_TOKEN from .env
[install.scopes]
"@privanote" = { token = "$GITHUB_TOKEN", url = "https://npm.pkg.github.com" }
- Install the package:
bun add @privanote/collaborators
- Set the GITHUB_TOKEN in your environment:
export GITHUB_TOKEN={GITHUB_TOKEN}
- Add privanote registry to .npmrc file in your project root:
@privanote:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
- Install the package:
npm install @privanote/collaborators
- Setup
git clone git@github.com:privanote/core.git
cd core
bun install
- Managing the repo
- To create a package:
bun run add-bun-pkg <pkg-name>
bun run add-vite-pkg <pkg-name>
- To execute a package's script:
# one single package
bun run pkg <pkg-name> <script-name>
# all packages
bun run pkg-all <script-name>