|
@@ -0,0 +1,51 @@
|
|
|
+{
|
|
|
+ // 编译全部ts文件 tsc
|
|
|
+ // 监听编译 tsc -w
|
|
|
+ // include 匹配文件入口
|
|
|
+ // ./ ../
|
|
|
+ // 任意文件目录 **
|
|
|
+ // 任意文件 *
|
|
|
+ "include": [
|
|
|
+ "./src/**/*"
|
|
|
+ ],
|
|
|
+ // exclude 排除文件入口
|
|
|
+ // "exclude": [
|
|
|
+ // "./src/**/*"
|
|
|
+ // ],
|
|
|
+ // extends 继承
|
|
|
+ // files 文件,
|
|
|
+ // compilerOptions 编译选项
|
|
|
+ "compilerOptions": {
|
|
|
+ // 解决target报错
|
|
|
+ "moduleResolution": "Node",
|
|
|
+ // target规定ts编译成那个js版本: 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'esnext'
|
|
|
+ "target": "ES6",
|
|
|
+ // 模块 module 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext', 'preserve'
|
|
|
+ "module": "ES2015",
|
|
|
+ // lib 用于规定使用那个库
|
|
|
+ "lib": ["dom"],
|
|
|
+ // outDir 规定将编译后的文件具体放在哪个位置
|
|
|
+ "outDir": "./dist",
|
|
|
+ // outFile 将编译后的所有文件放在一个文件下
|
|
|
+ // "outFile": "./dist/app.js",
|
|
|
+ // 是否对js文件进行编译
|
|
|
+ "allowJs": true,
|
|
|
+ // checkJs 检查js文件是否符合编译规范
|
|
|
+ // "checkJs": false,
|
|
|
+ // removeComments 是否移除注释 默认false
|
|
|
+ "removeComments": true,
|
|
|
+ // noEmitOnError 规定错误是否允许编译
|
|
|
+ // "noEmitOnError": true,
|
|
|
+ // noEmit 规定文件是否被编译
|
|
|
+ // "noEmit": true,
|
|
|
+ // strict 严格检查总开关
|
|
|
+ "strict": false,
|
|
|
+ // alwaysStrict 编译后的文件是否是严格模式
|
|
|
+ // "alwaysStrict": false,
|
|
|
+ // noImplicitAny 不允许数据默认是any类型
|
|
|
+ // "noImplicitAny": false,
|
|
|
+ // noImplicitThis 规定是否允许使用this
|
|
|
+ // "noImplicitThis": false,
|
|
|
+ // "strictNullChecks": true
|
|
|
+ }
|
|
|
+}
|