@getresponse/tsconfig

1.1.0 • Public • Published

@getresponse/tsconfig

License


This package contains a universal tsconfig file that is optimized for browser, library, and Node.js LTS projects. It can help you set up your TypeScript projects quickly and easily.

Installation

  1. Install @getresponse/tsconfig as a development dependency:

    npm i --save-dev @getresponse/tsconfig
  2. Choose the appropriate config file for your project from @getresponse/tsconfig/configs:

  • For browser projects, use browser/tsconfig.json
  • For library projects with CommonJS modules, use lib/tsconfig.cjs.json
  • For library projects with ES modules, use lib/tsconfig.esm.json
  • For Node.js LTS projects, use either node-lts/tsconfig.cjs.json (CommonJS modules) or node-lts/tsconfig.json (ES modules)
  1. In your TypeScript configuration file (tsconfig.json), extend the chosen config file, for example (see documentation):

    {
         "extends": "@getresponse/tsconfig/configs/browser/tsconfig.json"
    }
  2. Optionally, customize the configuration options based on your project setup:

    • rootDir: set the root directory of your project (see rootDir)

    • include: specify which files should be included in the compilation process (see include)

    • exclude: specify which files should be excluded from the compilation process (see exclude)

    Here's an example with customized options:

    {
       "extends": "@getresponse/tsconfig/configs/browser/tsconfig.json",
       "compilerOptions": {
          "rootDir": "src"
       },
       "include": [
          "src/**/*",
          "types/**/*"
       ],
       "exclude": [
          "node_modules",
          "src/example-nested"
       ]
    }

That's it! Now you can enjoy the benefits of using a standardized tsconfig file in your TypeScript projects.

Package Sidebar

Install

npm i @getresponse/tsconfig

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

5.68 kB

Total Files

9

Last publish

Collaborators

  • ptarasiuk
  • slawekmarciniak
  • szymongr
  • lsobolew
  • mwojslaw-getresponse
  • lukaszczajka83