@4c/tsconfig 中文文档教程
@4c/tsconfig
一组用于 typescript 项目的可共享 tsconfig.json
Install
yarn add @4c/tsconfig -D
Usage
base.json
旨在针对特定用例进行扩展的通用配置
{
"extends": "@4c/tsconfig"
}
web.json
一组基于 DOM 的项目的默认设置。
{
"extends": "@4c/tsconfig/web.json"
}
node.json
基于 Node.js 的项目的一组默认值。 期望安装 @types/node
{
"extends": "@4c/tsconfig/node.json"
}
workspaces.json
web
配置,但在 VSCode 中添加了用于解析 yarn 工作区项目的插件,因此每个包 不必在为类型开发时构建。
{
"extends": "@4c/tsconfig/workspaces.json"
}
@4c/tsconfig
A set of shareable tsconfig.json
for typescript projects
Install
yarn add @4c/tsconfig -D
Usage
base.json
A generic config meant to be extended for specific use-cases
{
"extends": "@4c/tsconfig"
}
web.json
A set of defaults for DOM based projects.
{
"extends": "@4c/tsconfig/web.json"
}
node.json
A set of defaults for Node.js based projects. Expects @types/node
to be installed
{
"extends": "@4c/tsconfig/node.json"
}
workspaces.json
The web
config, but with an added plugin for resolution of yarn workspace projects in VSCode, so each package does not have to be built while developing for types.
{
"extends": "@4c/tsconfig/workspaces.json"
}