Getting started
This guide walks you through installing one or more @basmilius/* packages into a fresh Vue 3 + Vite project.
Prerequisites
- Node.js
>= 23or Bun>= 1.3.11. - A Vue 3.6+ project, ideally scaffolded with
bun create vite. - TypeScript with
experimentalDecoratorsenabled if you plan to use@basmilius/http-client.
Install your first package
Most consumers start with @basmilius/utils — it has no peer dependencies and works in any TypeScript project.
shell
bun add @basmilius/utilsshell
npm install @basmilius/utilsshell
pnpm add @basmilius/utilsshell
yarn add @basmilius/utilsts
import { formatDate, hexToRGB } from '@basmilius/utils';
import { DateTime } from 'luxon';
formatDate(DateTime.now()); // localised date string
hexToRGB('#0070f3'); // { r: 0, g: 112, b: 243 }Common stack
For a Vue 3 SPA that also talks to an HTTP API, the typical install is:
shell
bun add @basmilius/common @basmilius/http-client @basmilius/routing @basmilius/utilsshell
npm install @basmilius/common @basmilius/http-client @basmilius/routing @basmilius/utilsYou'll also want the peers:
shell
bun add vue vue-router pinia luxonTypeScript configuration
Several packages — most notably @basmilius/http-client — rely on stage-2 decorators. Make sure your tsconfig.json opts in:
json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler",
"strict": true,
"experimentalDecorators": true,
"useDefineForClassFields": true,
"isolatedDeclarations": true
}
}isolatedDeclarations is recommended but optional — it produces faster .d.ts emit when paired with @basmilius/tools.
Next steps
- Read each package's Introduction page (in the sidebar) for a high-level overview.
- Try the HTTP client quick start.
- See Modal routing for a richer UX pattern.