Skip to content

privanote/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

168d581 · Feb 26, 2024

History

16 Commits
Feb 26, 2024
Feb 26, 2024
Feb 19, 2024
Feb 26, 2024
Feb 22, 2024
Feb 19, 2024
Feb 19, 2024
Feb 26, 2024
Feb 19, 2024
Feb 19, 2024
Feb 26, 2024
Feb 26, 2024
Feb 19, 2024
Feb 19, 2024
Feb 26, 2024
Feb 19, 2024

Repository files navigation

core

Core utilities used by PrivaNote

Install a package

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.

Bun Environment (Recommended)

refer to: https://bun.sh/docs/install/registries

  1. 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
  1. 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" }
  1. Install the package:
bun add @privanote/collaborators

Node Environment:

  1. Set the GITHUB_TOKEN in your environment:
export GITHUB_TOKEN={GITHUB_TOKEN}
  1. Add privanote registry to .npmrc file in your project root:
@privanote:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
  1. Install the package:
npm install @privanote/collaborators

Development

  1. Setup
git clone git@github.com:privanote/core.git
cd core
bun install
  1. 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>