@reallyland/tsconfig

TypeScript configuration file for The Really Project

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@reallyland/tsconfig
004.0.12 years ago5 years agoMinified + gzip package size for @reallyland/tsconfig in KB

Readme

@reallyland/tsconfig

TypeScript configuration file for The Really Project




Buy Me A Coffee !tippin.metippin-me-badgetippin-me-url !Follow mefollow-me-badgefollow-me-url
!Versionversion-badgeversion-url !Node versionnode-version-badgenode-version-url !MIT Licensemit-license-badgemit-license-url
!Downloadsdownloads-badgedownloads-url !Total downloadstotal-downloads-badgedownloads-url !Packagephobiapackagephobia-badgepackagephobia-url !Bundlephobiabundlephobia-badgebundlephobia-url
!Code of Conductcoc-badgecoc-url
TypeScript configuration file for The Really Project, works for either browser or Node.js.

Table of contents

- Install - Usage
- [Node.js](#nodejs)
- [Browser](#browser)

Pre-requisites

Setup

Install

# Install via NPM
$ npm install --save @reallyland/tsconfig

Usage

Note that the following fields are required after extending the sharable tsconfig:
  • compilerOptions.rootDir
  • compilerOptions.outDir
  • compilerOptions.declarationDir
  • include
  • exclude

Node.js

tsconfig.json
{
  "extends": "@reallyland/tsconfig",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist",
    "declarationDir": "dist"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["dist"]
}

Optional tsconfig.prod.json
{
  "extends": "@reallyland/tsconfig",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist",
    "declarationDir": "dist"
  },
  "include": ["src/*.ts"],
  "exclude": ["src/test/**/*.ts", "src/demo/**/*.ts"]
}

Browser

Main difference is that there are dom and dom.iterable are added in the lib field of /browser/tsconfig.json to provide typings for web platform APIs.
tsconfig.json
{
  "extends": "@reallyland/tsconfig/browser",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist",
    "declarationDir": "dist"
  },
  "include": ["src/**/*.ts"],
  "exclude": ["dist"]
}

License

MIT License © Rong Sen Ng (motss)