Skip to main content
This release is 1 version behind 0.1.1 — the latest version of @tkancharla/tandem. Jump to latest

A sync engine and database for building collaborative apps

It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
52%
Published
2 days ago (0.1.0)

npm-ts-boilerplate

A boilerplate for typescript packages for npm. Esbuild, Vitest.

# Build into dist folder
npm run build

# Check types
npm run check

npm run test

# Build and publish to NPM (make sure the version is bumped)
npm run release

# Print the bundlesize of the minified package and exit
npm run bundlesize

I've been iterating on this for a while. Here are the interesting bits:

  • Packages are bundled into index.cjs (for CommonJS) and index.js (for ESM).
  • Types are all bundled into index.d.ts
  • Sourcemaps for bundles point to src directory. One could argue the bundles are readable by themselves (since they're not minified), but the source map files are small, and reading in Typescript vs. Javascript can help debug (you know the type of each variable).
  • Only src and dist folders are published to NPM.
  • Tests are in *.test.ts files, run by Vitest

The reason I don't just use Parcel (my preferred build system) is because of:

Add Package

deno add jsr:@tkancharla/tandem

Import symbol

import * as tandem from "@tkancharla/tandem";

---- OR ----

Import directly with a jsr specifier

import * as tandem from "jsr:@tkancharla/tandem";

Add Package

npx jsr add @tkancharla/tandem

Import symbol

import * as tandem from "@tkancharla/tandem";

Add Package

yarn dlx jsr add @tkancharla/tandem

Import symbol

import * as tandem from "@tkancharla/tandem";

Add Package

pnpm dlx jsr add @tkancharla/tandem

Import symbol

import * as tandem from "@tkancharla/tandem";

Add Package

bunx jsr add @tkancharla/tandem

Import symbol

import * as tandem from "@tkancharla/tandem";