Accessible off-canvas bar library for the web. Supports multiple bars on any side of the viewport. Published as @fokke-/bartender.js on npm.
- Homepage: https://bartender.fokke.fi
- Repository: https://github.com/Fokke-/bartender.js
- TypeScript (strict mode, ESNext target)
- Vite (library mode, outputs ES + UMD to
dist/) - SCSS for styles
- pnpm as package manager
pnpm dev- Dev serverpnpm build- Build librarypnpm lint- ESLint (src/andtests/)pnpm format- Prettier (whole project)pnpm test- Build library and run tests (Vitest + Playwright browser)pnpm test:watch- Build library and run tests in watch mode
src/lib/- Library source (Bartender, BartenderBar, events, utils, types)src/index.ts- Public API exportssrc/main.ts- Dev entry pointsrc/assets/- SCSS styles
- Prettier: no semicolons, single quotes, trailing commas, 2-space indent, 80 char width
- ESLint: Vue/TS config,
anyallowed, unused vars prefixed with_ - Tests: Vitest with @vitest/browser + Playwright (headless Chromium), tests in
tests/target builtdist/
- Always format code with Prettier (
pnpm format) after making changes - Never create git commits.
git addis allowed when the user requests it. - Pre-commit hook (Husky) runs
tsc --noEmitand lint-staged (ESLint + Prettier) on commit - Always use exact versions when installing npm packages (no
^or~prefixes)
masteris the main/release branchdevis the development branch