1.1.0 • Published 6 months ago

@getresponse/tsconfig v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@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.

1.1.0

6 months ago

1.0.4

7 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.3

12 months ago

1.0.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.3.0

1 year ago