Configuration Reference
Configuration Reference
Section titled “Configuration Reference”Basic Configuration
Section titled “Basic Configuration”{ "source": "src", "output": "container.gen.ts", "interface": "I[A-Z].*", "exclude": ["**/*.test.ts", "**/*.spec.ts"], "checkCycles": false, "verbose": false, "modules": { "UserModule": ["user/**", "auth/**"], "TodoModule": ["todo/**"] }}
Configuration Options
Section titled “Configuration Options”Option | Type | Default | Description |
---|---|---|---|
source | string | "src" | Source directory to scan |
output | string | "container.gen.ts" | Output file path |
interface | string | "I[A-Z].*" | Interface name pattern (regex) |
exclude | string[] | [] | File patterns to exclude |
checkCycles | boolean | false | Only check circular dependencies |
verbose | boolean | false | Enable detailed logging |
modules | Record<string, string[]> | undefined | Module definitions |
Interface Patterns
Section titled “Interface Patterns”"I[A-Z].*"
- Interfaces starting with ‘I’".*Interface$"
- Interfaces ending with ‘Interface’".*Service$"
- Interfaces ending with ‘Service’"(I[A-Z].*|.*Service$|.*Repository$)"
- Multiple patterns
Exclude Patterns
Section titled “Exclude Patterns”{ "exclude": [ "**/*.test.ts", "**/*.spec.ts", "**/mocks/**", "**/*.d.ts" ]}
Module Configuration
Section titled “Module Configuration”{ "modules": { "UserModule": ["user/**", "auth/**"], "TodoModule": ["todo/**", "!todo/**/*.test.ts"], "InfrastructureModule": ["infrastructure/**", "repositories/**"] }}
CLI Override
Section titled “CLI Override”npx @notjustcoders/ioc-arise generate --source lib --output custom.ts --verbosenpx @notjustcoders/ioc-arise generate --config ioc.dev.json# or, if installed globally:ioc-arise generate --source lib --output custom.ts --verbose
Priority: CLI arguments > Configuration file > Defaults
Project Examples
Section titled “Project Examples”Monorepo:
{ "source": "packages", "modules": { "CoreModule": ["packages/core/**"], "UIModule": ["packages/ui/**"] }}
Clean Architecture:
{ "interface": "(I[A-Z].*|.*UseCase$|.*Repository$)", "modules": { "DomainModule": ["domain/**"], "UseCaseModule": ["use-cases/**"] }}