npm.io
1.0.22 • Published 4 years ago

@hairy/vue-directive

Licence
ISC
Version
1.0.22
Deps
3
Size
6 kB
Vulns
0
Weekly
0
Stars
12

Hairylib Monorepo


npm version npm downloads bundle JSDocs License

Hairylib is a monorepo project managed and published using pnpm and bumpp. It collects the libraries and utilities I use across projects into one place, with shared tooling and workflows.

What are the benefits of a Monorepo?

  • Dependency Hoisting. When multiple projects depend on common libraries like react, vue, or TypeScript, using pnpm workspace with the catalog: protocol hoists dependencies to the top level. This allows multiple sub-modules/packages to reuse the same dependencies, reducing project size and ensuring consistency.

  • Unified Management. In micro-frontend projects, multiple sub-applications can be placed in the same monorepo for easier management. Backend projects using node.js can also be managed with the same technology stack in a monorepo. During CI/CD and other pipeline processes, this facilitates unified iteration or version upgrades, and makes it easier to apply common config across multiple sub-projects.

  • Unified Publishing. Tools like bumpp and pnpm for unified publishing simplifies version management and reduces publishing complexity. and the github release is automatically generated. This makes it easier to manage the version of the entire project and publish it to npm.

Workflow

  • Code quality: Unified linting and formatting powered by antfu/eslint-config and lint-staged and simple-git-hooks.
  • Continuous integration: GitHub Actions runs pnpm lint, pnpm test, and pnpm typecheck (tsc --noEmit) on every push/PR so branch stays green.
  • Versioning & Releases: Use bumpp for versioning and changelogithub for CHANGELOG and GitHub Releases and Automate passwordless publishing via npm Trusted Publisher
  • Build & runtime: tsdown outputs both esm and cjs bundles; tsx is used to run TypeScript directly during development.
  • Monorepo DX: Uses pnpm catalog for centralized dependency management and hoisting; during development packages import each other's index.ts directly to simplify cross-package references.
  • Testing: vitest with built-in workspace support for fast, isolated tests.

Packages in this monorepo

These are the packages currently maintained in this repository:

All publishable packages share the same toolchain: tsdown for builds, vitest for tests, tsx for quick scripts, and pnpm workspaces with catalog: hoisting for consistent dependency versions.

License

MIT License Hairyf