mine-auto-cli 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2023-present biaov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,29 +1,55 @@
1
1
  # mine-auto-cli
2
2
 
3
- 一个本地自动化打包工具,用来节省你的工作流程。
3
+ 一个将多个命令简化成一个命令的项目 😆
4
4
 
5
5
  <h2 align="center">
6
- <a href="https://www.npmjs.com/package/mine-auto-cli"><img src="https://img.shields.io/npm/v/mine-auto-cli.svg" /></a>
7
- <a href="https://www.npmjs.com/package/mine-auto-cli"><img src="https://img.shields.io/npm/dt/mine-auto-cli" /></a>
6
+ <a href="https://www.npmjs.com/package/mine-auto-cli"><img src="https://img.shields.io/npm/v/mine-auto-cli.svg?logo=npm" /></a>
7
+ <a href="https://www.npmjs.com/package/mine-auto-cli"><img src="https://img.shields.io/npm/dt/mine-auto-cli?logo=Markdown" /></a>
8
8
  <a href="https://www.npmjs.com/package/mine-auto-cli"><img src="https://packagephobia.com/badge?p=mine-auto-cli" /></a>
9
+ <a href="https://github.com/biaov/mine-auto-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?logo=Unlicense" /></a>
9
10
  </h2>
10
11
 
11
12
  ## 使用
12
13
 
13
- ### 安装
14
+ - 简化 Git 提交命令
14
15
 
15
- ```Basic
16
- npm i mine-auto-cli -g
16
+ ```sh
17
+ auto git [描述]
18
+ # 等同于
19
+ git add -A
20
+ git commit -m [描述]
21
+ git push
17
22
  ```
18
23
 
19
- ### 自动打包
24
+ - 简化打包提交命令
20
25
 
21
- ```Basic
22
- ab build [desc]
26
+ ```sh
27
+ auto build[:环境] [描述]
28
+ # 等同于
29
+ npm run build:staging
30
+ git add -A
31
+ git commit -m [描述]
32
+ git push
23
33
  ```
24
34
 
25
- ### 自动 git 提交
35
+ ### 技术栈
26
36
 
27
- ```Basic
28
- ab git [desc]
29
- ```
37
+ - `Vite` + `TypeScript` + `Node`
38
+
39
+ ### 依赖特性
40
+
41
+ - `chalk`: 字体颜色
42
+ - `commander`: 命令
43
+ - `log-symbols`: 图标
44
+ - `ora`: 动画效果
45
+ - `update-notifier`: 检查更新
46
+ - `@types/node`: `node` 类型
47
+ - `@types/update-notifier`: `update-notifier` 类型
48
+ - `chokidar`: 监听文件更改
49
+ - `prettier`: 格式化工具
50
+ - `typescript`: 编程语言
51
+ - `vite`: 项目构建工具
52
+
53
+ ## 贡献者们
54
+
55
+ [![贡献者](https://contrib.rocks/image?repo=biaov/mine-auto-cli)](https://github.com/biaov/mine-auto-cli/graphs/contributors)
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../index.js'
package/index.js ADDED
@@ -0,0 +1,146 @@
1
+ import f from "update-notifier";
2
+ import t from "chalk";
3
+ import { program as i } from "commander";
4
+ import y from "ora";
5
+ import { execSync as v } from "child_process";
6
+ import m from "log-symbols";
7
+ const l = "mine-auto-cli", d = "2.0.0", $ = "./index.js", w = "./index.js", k = "module", j = {
8
+ auto: "bin/mine-auto-cli.js"
9
+ }, x = {
10
+ name: "biaov",
11
+ email: "biaov@qq.com",
12
+ url: "https://biaov.cn"
13
+ }, C = "一个将多个命令简化成一个命令的项目 😆", S = {
14
+ start: "npm run dev",
15
+ dev: "node scripts/dev",
16
+ build: "vite build && node scripts/build",
17
+ prettier: "prettier --write '**/*.{js,ts,md,json}'",
18
+ ncu: "ncu --configFileName .ncurc.json && npm i",
19
+ "pre-publish": "start cmd /k cd ./dist"
20
+ }, V = {
21
+ registry: "https://registry.npmjs.org/"
22
+ }, q = {
23
+ node: ">=16"
24
+ }, A = [
25
+ "auto",
26
+ "cli",
27
+ "vite",
28
+ "typescript"
29
+ ], E = {
30
+ type: "git",
31
+ url: "https://github.com/biaov/mine-auto-cli.git"
32
+ }, G = "https://github.com/biaov/mine-auto-cli.git", B = {
33
+ url: "https://github.com/biaov/mine-auto-cli/issues"
34
+ }, D = "ISC", T = [
35
+ {
36
+ name: "biaov",
37
+ email: "biaov@qq.com"
38
+ }
39
+ ], U = {
40
+ chalk: "^5.3.0",
41
+ commander: "^11.0.0",
42
+ "log-symbols": "^5.1.0",
43
+ ora: "^7.0.1",
44
+ "update-notifier": "^6.0.2"
45
+ }, F = {
46
+ "@types/node": "^20.8.4",
47
+ "@types/update-notifier": "^6.0.5",
48
+ chokidar: "^3.5.3",
49
+ prettier: "^3.0.3",
50
+ typescript: "^5.2.2",
51
+ vite: "^4.4.11"
52
+ }, c = {
53
+ name: l,
54
+ private: !1,
55
+ version: d,
56
+ exports: $,
57
+ main: w,
58
+ type: k,
59
+ bin: j,
60
+ author: x,
61
+ description: C,
62
+ scripts: S,
63
+ publishConfig: V,
64
+ engines: q,
65
+ keywords: A,
66
+ repository: E,
67
+ homepage: G,
68
+ bugs: B,
69
+ license: D,
70
+ contributors: T,
71
+ dependencies: U,
72
+ devDependencies: F
73
+ }, a = {}, I = [
74
+ {
75
+ name: "success",
76
+ color: t.green
77
+ },
78
+ {
79
+ name: "error",
80
+ color: t.red,
81
+ prefix: l
82
+ },
83
+ {
84
+ name: "warning",
85
+ color: t.red
86
+ },
87
+ {
88
+ name: "info"
89
+ }
90
+ ];
91
+ I.forEach(({ name: e, color: o, prefix: p = "" }) => {
92
+ a[e] = (n = "") => {
93
+ if (typeof n == "object") {
94
+ const { text: b = "", prefix: h = "" } = n;
95
+ b && console.log(`${h + " "}${n}`);
96
+ } else
97
+ console.log(o ? `${p + " "}${o(e.toUpperCase())} ${n}` : n);
98
+ };
99
+ });
100
+ a.iconError = m.error;
101
+ a.iconSuccess = m.success;
102
+ const N = (e) => ["git add -A", `git commit -m ${e}`, "git push"], O = (e, o) => [`npm run ${e}`, "git add -A", `git commit -m ${o}`, "git push"], { success: u, info: s, error: P } = a, g = (e) => {
103
+ s(`开始执行 ${t.cyanBright(e)} 命令`);
104
+ const o = y({ text: "正在执行命令中...", color: "yellow" });
105
+ o.start();
106
+ const p = v(e, { cwd: process.cwd() });
107
+ s(p.toString()), o.succeed(`${t.green(e)} 命令执行成功`), s();
108
+ }, z = async (e = "更新代码") => {
109
+ s(), s(`${t.yellow(">>")} 开始依次执行命令...`), s(), N(e).forEach(g), u("全部命令执行完成"), s();
110
+ }, H = async (e, o = "打包") => {
111
+ s(), s(`${t.yellow(">>")} 开始依次执行命令...`), s(), O(e, o).map(g), u("全部命令执行完成"), s();
112
+ }, J = (e, o) => {
113
+ if (e.includes("build"))
114
+ return H(e, o);
115
+ P(t.hex("#f56c6c")(`\`auto ${e}${o ? ` ${o}` : ""}\` 命令不存在`)), i.help();
116
+ };
117
+ i.usage("[commands] [options]").version(d, "-v, --version", "输出版本号").helpOption("-h, --help", "输出所有命令");
118
+ i.command("git [描述]").description("简化 Git 提交命令").action(z);
119
+ i.command("build[:环境] [描述]").description("简化打包提交命令");
120
+ i.arguments("<cmd> [env]").action((e, o) => {
121
+ J(e, o);
122
+ });
123
+ process.argv.length < 3 ? i.help() : i.parse(process.argv);
124
+ const r = f({ pkg: c });
125
+ if (r.update && r.update.latest !== c.version) {
126
+ let e = "";
127
+ switch (r.update.type) {
128
+ case "major":
129
+ e = t.red("{latestVersion}");
130
+ break;
131
+ case "minor":
132
+ e = t.yellow("{latestVersion}");
133
+ break;
134
+ default:
135
+ e = t.green("{latestVersion}");
136
+ break;
137
+ }
138
+ const o = `https://github.com/biaov/${c.name}/compare/v${c.version}...v{latestVersion}`;
139
+ r.notify({
140
+ defer: !1,
141
+ isGlobal: !0,
142
+ message: `有更新 ${t.dim("{currentVersion}")}${t.reset(" → ")}${e}
143
+ 运行 ${t.cyan("{updateCommand}")} 命令更新
144
+ ${t.dim.underline(o)}`
145
+ });
146
+ }
package/package.json CHANGED
@@ -1,36 +1,53 @@
1
1
  {
2
2
  "name": "mine-auto-cli",
3
- "version": "1.0.2",
4
- "description": "一个本地自动化打包工具,用来节省你的工作流程",
5
3
  "private": false,
6
- "main": "src/index.js",
4
+ "version": "2.0.0",
5
+ "exports": "./index.js",
6
+ "main": "./index.js",
7
+ "type": "module",
7
8
  "bin": {
8
- "auto": "bin/cli.js"
9
+ "auto": "bin/mine-auto-cli.js"
9
10
  },
10
- "scripts": {
11
- "start": "npm run serve",
12
- "serve": "tsc -p tsconfig.json -w",
13
- "build": "tsc -p tsconfig.json"
11
+ "author": {
12
+ "name": "biaov",
13
+ "email": "biaov@qq.com",
14
+ "url": "https://biaov.cn"
14
15
  },
15
- "repository": {
16
- "type": "git",
17
- "url": "git@gitee.com:biaovorg/mine-auto-cli.git"
16
+ "description": "一个将多个命令简化成一个命令的项目 😆",
17
+ "scripts": {},
18
+ "publishConfig": {
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
21
+ "engines": {
22
+ "node": ">=16"
18
23
  },
19
24
  "keywords": [
20
25
  "auto",
21
- "build",
22
- "tool"
26
+ "cli",
27
+ "vite",
28
+ "typescript"
23
29
  ],
24
- "author": "biaov <biaov@qq.com>",
25
- "license": "ISC",
26
- "devDependencies": {
27
- "@types/node": "^16.9.1"
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/biaov/mine-auto-cli.git"
33
+ },
34
+ "homepage": "https://github.com/biaov/mine-auto-cli.git",
35
+ "bugs": {
36
+ "url": "https://github.com/biaov/mine-auto-cli/issues"
28
37
  },
38
+ "license": "ISC",
39
+ "contributors": [
40
+ {
41
+ "name": "biaov",
42
+ "email": "biaov@qq.com"
43
+ }
44
+ ],
29
45
  "dependencies": {
30
- "chalk": "^4.1.2",
31
- "commander": "^8.2.0",
32
- "log-symbols": "^4.1.0",
33
- "module-alias": "^2.2.2",
34
- "ora": "^4.1.1"
35
- }
36
- }
46
+ "chalk": "^5.3.0",
47
+ "commander": "^11.0.0",
48
+ "log-symbols": "^5.1.0",
49
+ "ora": "^7.0.1",
50
+ "update-notifier": "^6.0.2"
51
+ },
52
+ "devDependencies": {}
53
+ }
package/bin/cli.js DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- require('../dist/src')
package/src/abconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "project": {
3
- "demo": "D:/Mine/Code/Gitee/Private/BIAOV/demo"
4
- },
5
- "cmd": ["git pull", "npm run build:test", "git add -A", "git commit -m '打包'", "git push"]
6
- }
@@ -1,129 +0,0 @@
1
- import log from '@/utils/log' // 日志
2
- import ora from 'ora' // 显示动画效果
3
- import { execSync } from 'child_process'
4
- import { yellow, red, blueBright, cyanBright, green } from 'chalk' // 添加字体颜色
5
- import { program } from 'commander' // 自动解析命令和参数
6
- import { DynamicType } from '@/utils/interfaces' // 接口
7
- import { readFileSync, writeFileSync, mkdirSync, accessSync } from 'fs'
8
- import { resolve, join, dirname } from 'path'
9
- import abconfig from '../abconfig.json'
10
- import { version } from '@/../package.json' // 包信息
11
- import { ABConfig } from './interfaces'
12
- import { programOption } from './enums'
13
- import { gitCmds, buildCmds } from './cmds'
14
-
15
- const cwd = process.cwd() // 程序根路径
16
- const { iconError, iconSuccess, success, info, error, warning } = log
17
- const configName = 'abconfig.json'
18
- let endConfig: ABConfig = abconfig
19
-
20
- const logOption = programOption.log || programOption.log2
21
- const showLog = process.argv.some(value => value === logOption)
22
-
23
- // 执行命令
24
- const executeCommand = async (dir: string) => {
25
- info(dir)
26
- info()
27
- info(blueBright(`auto-build v${version}`))
28
- info()
29
- info(`${yellow('>>')} 在此目录下自动化打包项目:${yellow(dir)}`)
30
- const building = endConfig.cmd.map(async cmd => {
31
- info(`开始执行 ${cyanBright(cmd)} 命令`)
32
- const spinner = ora({ text: '正在执行命令中...', color: 'yellow' })
33
- spinner.start()
34
- info()
35
- execSync(cmd, {
36
- cwd: dir
37
- })
38
- spinner.succeed(`${green(cmd)} 命令执行成功`)
39
- return await new Promise(resolve => {
40
- resolve(true)
41
- })
42
- })
43
- await Promise.all(building)
44
- info()
45
- success('命令全部执行完成')
46
- }
47
-
48
- // 创建目录
49
- const createDirs = (dir: string) => {
50
- try {
51
- accessSync(dir)
52
- return true
53
- } catch {
54
- if (createDirs(dirname(dir))) {
55
- mkdirSync(dir)
56
- return true
57
- }
58
- }
59
- }
60
-
61
- // 初始化 config 文件
62
- export const initConfig = async (dir = './') => {
63
- const outDir = join(cwd, dir)
64
- const entryFile = resolve(__dirname, `../${configName}`)
65
- const spinner = ora({ text: '文件初始化中...', color: 'yellow' })
66
- info()
67
- spinner.start()
68
- const content = readFileSync(entryFile).toString() // 读取需要修改的文件
69
- createDirs(outDir) // 创建目录
70
- writeFileSync(join(outDir, configName), content) // 写入文件
71
- spinner.succeed('文件初始化成功') // 下载成功
72
- info()
73
- }
74
-
75
- // auto build
76
- export const autoBuild = (path = '') => {
77
- const options = program.opts()
78
- options.config && (endConfig = JSON.parse(readFileSync(join(process.cwd(), options.config)).toString()))
79
- options.dir && (path = options.dir)
80
- options.project && (path = endConfig.project[options.project])
81
- !path && (path = './')
82
- const dir = join(cwd, path)
83
- executeCommand(dir)
84
- }
85
-
86
- // git 命令
87
- export const git = (value = 'update') => {
88
- info()
89
- info(`${yellow('>>')} 开始依次执行命令...`)
90
- info()
91
- // 执行命令
92
- gitCmds.map(cmd => {
93
- info(`开始执行 ${cyanBright(cmd)} 命令`)
94
- const spinner = ora({ text: '正在执行命令中...', color: 'yellow' })
95
- spinner.start()
96
- cmd.includes('-m') && (cmd += ` ${value}`)
97
- const childProcess = execSync(cmd, {
98
- cwd: process.cwd()
99
- })
100
- showLog && info(childProcess.toString())
101
- spinner.succeed(`${green(cmd)} 命令执行成功`)
102
- info()
103
- })
104
- success('全部命令执行完成')
105
- info()
106
- }
107
- // build 命令
108
- export const build = (value = 'build') => {
109
- info()
110
- info(`${yellow('>>')} 开始依次执行命令...`)
111
- info()
112
-
113
- // 执行命令
114
- buildCmds.map(cmd => {
115
- info(`开始执行 ${cyanBright(cmd)} 命令`)
116
- const spinner = ora({ text: '正在执行命令中...', color: 'yellow' })
117
- spinner.start()
118
- cmd.includes('-m') && (cmd += ` ${value}`)
119
- const childProcess = execSync(cmd, {
120
- cwd: process.cwd()
121
- })
122
- showLog && info(childProcess.toString())
123
- spinner.succeed(`${green(cmd)} 命令执行成功`)
124
- info()
125
- })
126
-
127
- success('全部命令执行完成')
128
- info()
129
- }
@@ -1,6 +0,0 @@
1
- // 关于 git 的 cmd 命令
2
- export const gitCmds: string[] = ['git add -A', 'git commit -m', 'git push']
3
- // export const gitCmds: string[] = ['npm run build:staging', 'git add -A']
4
-
5
- // 关于打包的命令
6
- export const buildCmds: string[] = ['npm run build:staging', 'git add -A', 'git commit -m', 'git push']
@@ -1,4 +0,0 @@
1
- export enum programOption {
2
- log = '-l',
3
- log2 = '--log'
4
- }
@@ -1,24 +0,0 @@
1
- import { program } from 'commander'
2
- import { version, name } from '@/../package.json'
3
- import { initConfig, autoBuild, git,build } from './actions'
4
-
5
- // 定义命令带参数
6
- // options 重写
7
- program
8
- .usage('[commands] [options]')
9
- .version(version, '-v, --version', '输出版本号')
10
- .helpOption('-h, --help', '输出所有命令')
11
- .option('-d, --dir <dir>', '自动化打包目录')
12
- .option('-p, --project <name>', '自动化打包项目,对应 abconfig.json 里的 project')
13
- .option('-c, --config <filePath>', `${name} 配置文件地址`)
14
- .option('-i, --init [dir]', `初始化 ${name} 配置文件 abconfig.json, 相对路径`)
15
- .option('-l, --log', '运行命令时打印日志')
16
-
17
- // 命令
18
- program.command('start [dir]').description('运行自动化构建,dir 表示目录').action(autoBuild) // 注册命令的回调
19
- program.command('init [dir]').description('初始化配置文件,dir 表示目录').action(initConfig) // 注册命令的回调
20
- program.command('git [desc]').description('git 提交').action(git) // 注册命令的回调
21
- program.command('build [desc]').description('打包提交').action(build) // 注册命令的回调
22
-
23
- process.argv.length < 3 && program.help() // 如果后序没有输入命令,执行帮助指令
24
- program.parse(process.argv) // 处理参数
@@ -1,4 +0,0 @@
1
- export interface ABConfig {
2
- project: any
3
- cmd: string[]
4
- }
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- #! /usr/bin/env node
2
- import "./utils";
3
- import "./commander";
@@ -1,11 +0,0 @@
1
- /**
2
- * @file 路径引入文件
3
- */
4
-
5
- import path from 'path'
6
- import moduleAlias from 'module-alias'
7
- export default () => {
8
- moduleAlias.addAliases({
9
- '@': path.resolve(__dirname, '../')
10
- })
11
- }
@@ -1,5 +0,0 @@
1
- import addAlias from './alias' // 别名
2
- addAlias()
3
- /// <reference path="./module.d.ts" />
4
- import log from './log'
5
- export default { log }
@@ -1,10 +0,0 @@
1
- // 所有动态对象
2
- export interface DynamicType {
3
- [arg: string]: any
4
- }
5
-
6
- // 日志 API
7
- export interface LogAags {
8
- text: string
9
- prefix?: string
10
- }
package/src/utils/log.ts DELETED
@@ -1,47 +0,0 @@
1
- /**
2
- * @file 日志打印文件
3
- */
4
-
5
- import { red, green } from 'chalk'
6
- import logSymbols from 'log-symbols' // 显示出 √ 或 × 等的图标
7
- import { DynamicType, LogAags } from './interfaces'
8
- import { name } from '@/../package.json'
9
- const log: DynamicType = {}
10
- const { error, success } = logSymbols
11
- // 管理命令 log 颜色
12
- const logTypes: Array<DynamicType> = [
13
- {
14
- name: 'success',
15
- color: green
16
- },
17
- {
18
- name: 'error',
19
- color: red,
20
- prefix: name
21
- },
22
- {
23
- name: 'warning',
24
- color: red
25
- },
26
- {
27
- name: 'info'
28
- }
29
- ]
30
- // 循环遍历
31
- logTypes.forEach(({ name: logName, color, prefix = '' }: DynamicType): void => {
32
- log[logName] = (text: string | LogAags = ''): void => {
33
- // 是否为对象
34
- if (typeof text === 'object') {
35
- const { text: content = '', prefix: prefixTxt = '' } = text
36
- content && console.log(`${prefixTxt + ' '}${text}`)
37
- } else if (color) {
38
- // 是否有颜色
39
- console.log(`${prefix + ' '}${color(logName.toUpperCase())} ${text}`)
40
- } else {
41
- console.log(text)
42
- }
43
- }
44
- })
45
- log.iconError = error
46
- log.iconSuccess = success
47
- export default log
@@ -1 +0,0 @@
1
- declare module "module-alias"; // 定义 module-alias 模块
package/tsconfig.json DELETED
@@ -1,70 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
- /* Basic Options */
5
- // "incremental": true, /* Enable incremental compilation */
6
- "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
7
- "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
8
- // "lib": [], /* Specify library files to be included in the compilation. */
9
- // "allowJs": true, /* Allow javascript files to be compiled. */
10
- // "checkJs": true, /* Report errors in .js files. */
11
- // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
12
- // "declaration": true, /* Generates corresponding '.d.ts' file. */
13
- // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
14
- // "sourceMap": true, /* Generates corresponding '.map' file. */
15
- // "outFile": "./", /* Concatenate and emit output to single file. */
16
- "outDir": "./dist", /* Redirect output structure to the directory. */
17
- // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
18
- // "composite": true, /* Enable project compilation */
19
- // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
20
- // "removeComments": true, /* Do not emit comments to output. */
21
- // "noEmit": true, /* Do not emit outputs. */
22
- // "importHelpers": true, /* Import emit helpers from 'tslib'. */
23
- // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
24
- // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
25
- /* Strict Type-Checking Options */
26
- "strict": true, /* Enable all strict type-checking options. */
27
- // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
28
- // "strictNullChecks": true, /* Enable strict null checks. */
29
- // "strictFunctionTypes": true, /* Enable strict checking of function types. */
30
- // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
31
- // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
32
- // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
33
- // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
34
- /* Additional Checks */
35
- // "noUnusedLocals": true, /* Report errors on unused locals. */
36
- // "noUnusedParameters": true, /* Report errors on unused parameters. */
37
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
38
- // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
39
- // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
40
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */
41
- // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
42
- /* Module Resolution Options */
43
- // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
44
- "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
45
- "paths": {
46
- "@/*": [
47
- "src/*"
48
- ]
49
- }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
50
- // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
51
- // "typeRoots": [], /* List of folders to include type definitions from. */
52
- // "types": [], /* Type declaration files to be included in compilation. */
53
- // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
54
- "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
55
- // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
56
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
57
- /* Source Map Options */
58
- // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
59
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60
- // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
61
- // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
62
- /* Experimental Options */
63
- "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
64
- // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
65
- /* Advanced Options */
66
- "skipLibCheck": true, /* Skip type checking of declaration files. */
67
- "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
68
- "resolveJsonModule": true
69
- }
70
- }