1.2.0 • Published 1 year ago
@alexasselin/typescript-configs1 v1.2.0
@sharegate/typescript-configs
This packages provides a base TypeScript configuration depending on the JavaScript runtime environment which you intend to run your code in. These are tsconfig.json files which your project extends from which simplifies your tsconfig.json by handling the runtime support.
Installation
Install the package.
With npm
npm i --save-dev @sharegate/typescript-configs
With yarn
yarn add --dev @sharegate/typescript-configs
Usage
Create React App Project
To start, create a tsconfig.json in the root of your project.
{
"extends": "@sharegate/typescript-configs/cra.json",
"compilerOptions": {
"baseUrl": ".",
},
"include": ["src"],
"exclude": ["node_modules"]
}
NextJS Project
{
"extends": "@sharegate/typescript-configs/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
},
"include": ["src"],
"exclude": ["node_modules"]
}
React Library Project
{
"extends": "@sharegate/typescript-configs/react-library.json",
"compilerOptions": {
"baseUrl": ".",
},
"include": ["src"],
"exclude": ["node_modules"]
}
Other type of React Project
{
"extends": "@sharegate/typescript-configs/react.json",
"compilerOptions": {
"baseUrl": ".",
}
}
TypeScript Library
{
"extends": "@sharegate/typescript-configs/library.json",
"compilerOptions": {
}
}
All Other TypeScript Projects
{
"extends": "@sharegate/typescript-configs/base.json",
"compilerOptions": {
}
}
License
Copyright © 2023, GSoft inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/gsoft-license/blob/master/LICENSE.