Skip to content

Installation

@almighty-shogun/common ships as ESM and exposes named exports from the package root. Install Vue and Vue Router alongside it because the composables, refs, and route helpers use Vue runtime APIs.

Install

sh
bun add @almighty-shogun/common vue vue-router
sh
npm install @almighty-shogun/common vue vue-router
sh
pnpm add @almighty-shogun/common vue vue-router
sh
yarn add @almighty-shogun/common vue vue-router

Importing

All public APIs are available from the package root.

ts
import { translate, useIsRoute } from '@almighty-shogun/common';

Requirements

  • Vue 3.5+ for composables and refs.
  • Vue Router 5.x for route helpers.
  • No translation library. Helpers such as translate and translationExists detect Vue I18n automatically when it is installed, and otherwise use whatever instance you pass to registerI18n. Any object with t/te or $t/$te methods works, so Vue I18n is supported but never imported or required.

All packages are released under the MIT License.