A collection of utilities and packages for Angular applications.
Optimized font loading for Angular with SSR support, inspired by @next/font.
Features:
- 🚀 Build-time optimization for self-hosted fonts
- ⚡ Runtime service for dynamic font loading
- 🔄 SSR compatible with Angular 17+
- 🎨 Tailwind v3 and v4 integration
- 📦 1000+ Google Fonts available
- 🏠 Local font support
- 🎯 Zero layout shift with automatic fallback metrics
Installation:
npm install angular-fonts
# or
pnpm add angular-fontsSee the font package documentation for detailed usage.
More Angular utility packages coming soon!
This monorepo includes:
- packages/: Published npm packages- font: Font loading and optimization utilities
 
- apps/: Example applications and documentation- web: Demo application showcasing package features
 
Each package is built with TypeScript and designed for modern Angular applications.
This monorepo uses Turborepo for efficient task management and pnpm for package management.
- Node.js 18.x or 20.x
- pnpm 8.x or higher
- Clone the repository:
git clone https://github.com/SOG-web/angular-utils.git
cd angular-utils- Install dependencies:
pnpm install- Build all packages:
pnpm build- Run the demo app:
pnpm dev --filter=webOr try the live demo: https://sog-web.github.io/angular-utils/
Build all packages and apps:
pnpm buildBuild a specific package:
pnpm build --filter=angular-fontsRun tests for all packages:
pnpm testRun tests for a specific package:
pnpm test --filter=angular-fontsWhen developing a package:
- Make changes to the package source code
- Build the package: pnpm build --filter=<package-name>
- Run tests: pnpm test --filter=<package-name>
- Test in the demo app: pnpm dev --filter=web
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch: git checkout -b feature/amazing-feature
- Make your changes
- Run tests: pnpm test
- Commit your changes: git commit -m 'Add amazing feature'
- Push to the branch: git push origin feature/amazing-feature
- Open a Pull Request
To add a new Angular utility package:
- Create a new directory in packages/
- Set up the package structure (see packages/fontas a reference)
- Add package configuration (package.json,tsconfig.json)
- Update this README to list the new package
- Add comprehensive tests and documentation
MIT License - see individual package LICENSE files for details.