No description
Find a file
2026-03-10 21:47:03 +01:00
scripts updating from ts-lib tmeplate version 0.2.7 2026-03-10 21:37:21 +01:00
src to avaoid error for now 2026-03-08 15:38:03 +01:00
tests carryover from local development 2026-03-08 15:35:22 +01:00
.gitignore creating files from ts-lib template v0.2.6 2026-03-08 15:12:34 +01:00
CHANGELOG.md creating files from ts-lib template v0.2.6 2026-03-08 15:12:34 +01:00
LICENSE setting up common lib package 2026-03-08 15:14:58 +01:00
package.json updating from ts-lib tmeplate version 0.2.7 2026-03-10 21:37:21 +01:00
README.md carryover README draft from local 2026-03-08 15:37:49 +01:00
tsconfig.build.json creating files from ts-lib template v0.2.6 2026-03-08 15:12:34 +01:00
tsconfig.json creating files from ts-lib template v0.2.6 2026-03-08 15:12:34 +01:00

Introduction

This package contains common TypeScript utilities and types used across the Vode App codebase.

Table of Contents

  1. Quick Start
  2. Documentation
  3. DevOps
    1. Change Management
    2. Publish
      1. npmjs.org
      2. Custom registry

Quick Start

# remove dist/ and tsconfig.build.tsbuildinfo
bun run clean

# remove dist/ only
bun run clean:dist

# remove tsconfig.build.tsbuildinfo only
bun run clean:tsbuildinfo

# compile + bundle
bun run build

# run tests
bun run tests

# run src/dev.ts in watch mode
bun run dev

Publish - see Publish.

Documentation

<DOCUMENTATION>

Asset Resolution

<!-- Remove this section if the library has no runtime assets. Replace @scope/lib-name throughout with the actual package name. -->

Assets are placed under assets/@scope/lib-name/ (scoped to the package name to prevent collisions). They are resolved at runtime via import.meta.url and loaded with fetch() (browser) or readFile (Node). assets/ must be listed in files in package.json.

import.meta.url is reliable when the library is loaded as a discrete module (from CDN or node_modules/). When the consumer bundles the library, they must copy the assets — see below.

For consumers bundling this library

Copy node_modules/@scope/lib-name/assets/ into your build output alongside the bundle, preserving the relative path. No code configuration is required — only the file copy.

DevOps

Change Management

  1. Create a new branch for the change.
  2. Make the changes and commit.
  3. Bump the version in package.json.
  4. Add an entry for the new version in CHANGELOG.md.
  5. Pull request the branch.
  6. After merge, run bun run build.
  7. Publish.

Publish

See the following sources to configure the target registry and authentication.

⚠️ Package Scope and the authentication for the target registry must be aligned.

npmjs.org

Publish to the public npm registry.

# authenticate
npm login
# publish
bun publish --registry https://registry.npmjs.org/ --access public

Custom registry

# placeholder:
    # <SCOPE_WITHOUT_AT: <SCOPE_WITHOUT_AT>
    # <REGISTRY_URL: <REGISTRY_URL>
    # <BUN_PUBLISH_AUTH_TOKEN: <BUN_PUBLISH_AUTH_TOKEN>

~/.bunfig.toml or bunfig.toml:

[install.scopes]
"<SCOPE_WITHOUT_AT>" = { url = "<REGISTRY_URL>", token = "$BUN_PUBLISH_AUTH_TOKEN" }
# authenticate
$env:BUN_PUBLISH_AUTH_TOKEN = "<BUN_PUBLISH_AUTH_TOKEN>"
# publish
bun publish