This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
NgxClassed is an Angular library for building type-safe, variant-based component styling utilities. It provides a classed function that creates computed signals for dynamic class generation based on variants and compound variants.
The project uses Nx workspace structure with:
- Library code:
packages/ngx-classed/- Main library with core functionality - Demo app:
apps/demo/- Demonstration application - Core function:
packages/ngx-classed/src/lib/classed.ts- Main entry point that creates computed signals - Type definitions:
packages/ngx-classed/src/lib/classed-types.ts- TypeScript interfaces and types - Resolver modules:
packages/ngx-classed/src/lib/resolvers/- Logic for variant and compound variant resolution
The classed function returns a computed signal factory that:
- Resolves base classes
- Applies variant-specific classes via
resolveVariants - Applies compound variant classes via
resolveCompoundVariants
nx build ngx-classed- Build the librarynx build- Build all projectsnpx nx run-many -t build- Build all projects (used in release)
nx test ngx-classed- Run library testsnx test- Run all tests
nx lint ngx-classed- Lint the librarynx lint- Lint all projects
nx serve demo- Run demo app at http://localhost:4200
packages/ngx-classed/src/lib/classed.ts- Main library functionpackages/ngx-classed/src/lib/resolvers/variants-resolver.ts- Variant resolution logicpackages/ngx-classed/src/lib/resolvers/compound-variants-resolver.ts- Compound variant resolutionpackages/ngx-classed/src/lib/utils.ts- Utility functions for class value coercion