1.0.2 • Published 1 year ago

@open-condo/tsconfig v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@open-condo/tsconfig NPM

A set of frequently used tsconfig.json for various typescript applications within the condo ecosystem.

Table of contents

Installation\ Usage

Installation

To install package simply run the following command if you're using npm as your package manager:

npm i @open-condo/tsconfig

or it's yarn alternative

yarn add @open-condo/tsconfig

Usage

To use a config, simply add it to the extends field of your tsconfig.json.

React library with src folder

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@open-condo/tsconfig/react-lib.json",
  "compilerOptions": {
    "rootDir": ".",
    "outDir": "dist"
  },
  "include": ["src"],
  "exclude": ["node_modules"]
}

Next.js application

{
  "schema": "https://json.schemastore.org/tsconfig",
  "extends": "@open-condo/tsconfig/next-app.json",
  "compilerOptions": {
    "baseUrl": "."
  },
  "include": ["**/*.ts", "**/*.tsx", "next-env.d.ts"],
  "exclude": ["node_modules"]
}

Make sure to override exclude, include, rootDir, outDir and baseUrl properties since it's calculation is relative to extendable tsconfig path