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-routersh
npm install @almighty-shogun/common vue vue-routersh
pnpm add @almighty-shogun/common vue vue-routersh
yarn add @almighty-shogun/common vue vue-routerImporting
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
translateandtranslationExistsdetect Vue I18n automatically when it is installed, and otherwise use whatever instance you pass toregisterI18n. Any object witht/teor$t/$temethods works, so Vue I18n is supported but never imported or required.