1.4.10 • Published 10 months ago

@denaro-config/tsconfig v1.4.10

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

@denaro-config/tsconfig

:tada: 前端工程化中的 tsconfig 通用配置, 提供多种打包场景的 tsconfig 配置, 您可以执行进行继承使用。

npm (scoped) NPM

GitHub repo size GitHub Repo stars GitHub issues GitHub top language

npm jsDelivr hits (npm scoped)

参考官网地址

tsconfig.json

安装至您的项目

npm install -D @denaro-config/tsconfig
# or
pnpm install -D @denaro-config/tsconfig
# or
yarn add -D @denaro-config/tsconfig

使用

在项目根目录下创建 tsconfig.json 文件, 参考配置内容如下:

  • CommonJS
{
    "extends": "@denaro-config/tsconfig/tsconfig.json"
}
  • ESNext
{
    "extends": "@denaro-config/tsconfig/tsconfig.esnext.json"
}
  • Vue3
{
    "extends": "@denaro-config/tsconfig/tsconfig.vue3.json"
}
  • Vite+Vue 项目

  • tsconfig.json

{
    "files": [],
    "references": [
        {
            "path": "./tsconfig.node.json"
        },
        {
            "path": "./tsconfig.app.json"
        }
    ]
}
  • tsconfig.app.json
{
    "extends": "@denaro-config/tsconfig/tsconfig.vue3.json",

    "include": [
        "env.d.ts",
        "src/**/*.ts",
        "src/**/*.tsx",
        "src/**/*.vue",
        "tests/**/*.ts",
        "tests/**/*.tsx"
    ],

    "exclude": ["src/**/__tests__/*", "node_modules", "lib", "dist"]
}
  • tsconfig.node.json
{
    "extends": "@denaro-config/tsconfig/tsconfig.node.json",

    "include": [
        "vite.config.*",
        "vitest.config.*",
        "cypress.config.*",
        "nightwatch.conf.*",
        "playwright.config.*"
    ]
}

结合 eslint 使用

参考 typescript

1.4.10

10 months ago

1.4.9

1 year ago

1.4.8

1 year ago

1.4.7

1 year ago

1.4.6

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.2.4

2 years ago

1.3.0

2 years ago

1.2.3

2 years ago

1.2.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago