@lokiverse/tsconfig
v0.2.1
Published
TypeScript configurations
Downloads
270
Readme
@lokiverse/tsconfig
📦 Installation
pnpm add -D @lokiverse/tsconfig
🔧 Configuration Types
This package provides several types of configurations that can be combined to create perfect TypeScript setup:
- Base Configuration: Core TypeScript settings
- Runtime Configurations: Environment-specific settings (Node.js, Browser)
- Framework Configurations: Framework-specific settings (React, Vite)
- Library Presets: Pre-configured combinations for common use cases
📝 Usage
Base Configuration
The foundation for all configurations:
{
"extends": "@lokiverse/tsconfig"
}
Runtime Configurations
Runtime configurations should be combined with either the base configuration or framework configurations:
Node.js Runtime
{
"extends": ["@lokiverse/tsconfig", "@lokiverse/tsconfig/runtime/node"]
}
Browser Runtime
{
"extends": ["@lokiverse/tsconfig", "@lokiverse/tsconfig/runtime/browser"]
}
Framework Configurations
Framework configurations should be combined with runtime configurations:
React with Browser Runtime
{
"extends": [
"@lokiverse/tsconfig",
"@lokiverse/tsconfig/runtime/browser",
"@lokiverse/tsconfig/frameworks/react"
]
}
Vite with Browser Runtime
{
"extends": [
"@lokiverse/tsconfig",
"@lokiverse/tsconfig/runtime/browser",
"@lokiverse/tsconfig/frameworks/vite"
]
}
Library Presets
Pre-configured combinations for common use cases. These already include the appropriate runtime and framework configurations:
Base Library
Foundation for library development:
{
"extends": "@lokiverse/tsconfig/presets/lib-base"
}
Node.js Library
Complete setup for Node.js libraries:
{
"extends": "@lokiverse/tsconfig/presets/lib-node"
}
Browser Library
Complete setup for browser libraries:
{
"extends": "@lokiverse/tsconfig/presets/lib-browser"
}
React Library
Complete setup for React libraries:
{
"extends": "@lokiverse/tsconfig/presets/lib-react"
}
🔨 Creating Custom Combinations
React Application with Node.js Backend
{
"extends": [
"@lokiverse/tsconfig",
"@lokiverse/tsconfig/runtime/node",
"@lokiverse/tsconfig/frameworks/react"
],
"compilerOptions": {
// custom options here
}
}
Vite Application with Browser Features
{
"extends": [
"@lokiverse/tsconfig",
"@lokiverse/tsconfig/runtime/browser",
"@lokiverse/tsconfig/frameworks/vite"
],
"compilerOptions": {
// custom options here
}
}