@azrico/azcli 1.0.2 → 1.0.4
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/package.json +4 -1
- package/.babelrc.js +0 -9
- package/dist/cli.js +0 -2
- package/nodemon.json +0 -5
- package/src/cli.ts +0 -53
- package/src/libs/builder/buildwp.ts +0 -47
- package/src/libs/builder/index.ts +0 -19
- package/src/libs/cleaner/cleanbuild.ts +0 -13
- package/src/libs/cleaner/cleannode.ts +0 -23
- package/src/libs/cleaner/index.ts +0 -32
- package/src/libs/commons/errorhandler.ts +0 -18
- package/src/libs/commons/helper_exec.ts +0 -27
- package/src/libs/commons/helper_interface.ts +0 -26
- package/src/libs/commons/index.ts +0 -6
- package/src/libs/integ/index.ts +0 -7
- package/src/libs/integ/integ_readme.ts +0 -8
- package/src/libs/yarnhelp/index.ts +0 -18
- package/src/libs/yarnhelp/yarnb.ts +0 -16
- package/src/libs/yarnhelp/yarni.ts +0 -16
- package/src/libs/yarnhelp/yarnt.ts +0 -16
- package/tsconfig.json +0 -105
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azrico/azcli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"bin": {
|
|
11
11
|
"azcli": "./dist/cli.js"
|
|
12
12
|
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
13
16
|
"keywords": [],
|
|
14
17
|
"private": false,
|
|
15
18
|
"author": "Azrideus",
|
package/.babelrc.js
DELETED
package/dist/cli.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* -------------------------------------------------------------------------- */"use strict";var _chalk=_interopRequireDefault(require("chalk")),_figlet=_interopRequireDefault(require("figlet")),_index=_interopRequireDefault(require("./libs/builder/index")),_index2=_interopRequireDefault(require("./libs/cleaner/index")),_index3=_interopRequireDefault(require("./libs/yarnhelp/index")),_helpers=require("yargs/helpers"),_yargs=_interopRequireDefault(require("yargs"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}/* -------------------------------------------------------------------------- */ /* Consts */ /* -------------------------------------------------------------------------- */var header=_chalk["default"].red(_figlet["default"].textSync("Az-cli",{font:"Cyberlarge",horizontalLayout:"full"})),yg=(0,_yargs["default"])((0,_helpers.hideBin)(process.argv));/* -------------------------------------------------------------------------- */ /* Start */ /* -------------------------------------------------------------------------- */yg.usage(header),applycmd(yg,(0,_index2["default"])()),applycmd(yg,(0,_index["default"])()),applycmd(yg,(0,_index3["default"])()),yg.demandCommand(1).options({quiet:{alias:["q","s"],describe:"quiet mode",demandOption:!1}});/* -------------------------------------------------------------------------- */var ygresult=yg.parse();/* -------------------------------------------------------------------------- */ /* Helper functions */ /* -------------------------------------------------------------------------- */function applycmd(a,b){!a||Array.isArray(b)&&(Array.isArray(b[0])?b.forEach(function(b){applycmd(a,b)}):a.command(b[0],b[1],b[2],b[3]))}
|
package/nodemon.json
DELETED
package/src/cli.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/* -------------------------------------------------------------------------- */
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import clear from 'clear';
|
|
6
|
-
import figlet from 'figlet';
|
|
7
|
-
import get_builder_commands from './libs/builder/index';
|
|
8
|
-
import get_clear_commands from './libs/cleaner/index';
|
|
9
|
-
import get_yarn_commands from './libs/yarnhelp/index';
|
|
10
|
-
import { hideBin } from 'yargs/helpers';
|
|
11
|
-
import integ from './libs/integ/index';
|
|
12
|
-
import path from 'path';
|
|
13
|
-
import yargs from 'yargs';
|
|
14
|
-
|
|
15
|
-
/* -------------------------------------------------------------------------- */
|
|
16
|
-
/* Consts */
|
|
17
|
-
/* -------------------------------------------------------------------------- */
|
|
18
|
-
const header = chalk.red(figlet.textSync('Az-cli', { font: 'Cyberlarge', horizontalLayout: 'full' }));
|
|
19
|
-
/* -------------------------------------------------------------------------- */
|
|
20
|
-
/* Start */
|
|
21
|
-
/* -------------------------------------------------------------------------- */
|
|
22
|
-
const yg: yargs.Argv<{}> = yargs(hideBin(process.argv));
|
|
23
|
-
yg.usage(header);
|
|
24
|
-
/* -------------------------------------------------------------------------- */
|
|
25
|
-
|
|
26
|
-
applycmd(yg, get_clear_commands());
|
|
27
|
-
applycmd(yg, get_builder_commands());
|
|
28
|
-
applycmd(yg, get_yarn_commands());
|
|
29
|
-
/* -------------------------------------------------------------------------- */
|
|
30
|
-
yg.demandCommand(1).options({
|
|
31
|
-
quiet: {
|
|
32
|
-
alias: ['q', 's'],
|
|
33
|
-
describe: 'quiet mode',
|
|
34
|
-
demandOption: false,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
/* -------------------------------------------------------------------------- */
|
|
38
|
-
const ygresult: any = yg.parse();
|
|
39
|
-
|
|
40
|
-
/* -------------------------------------------------------------------------- */
|
|
41
|
-
/* Helper functions */
|
|
42
|
-
/* -------------------------------------------------------------------------- */
|
|
43
|
-
function applycmd(yinstance: yargs.Argv<{}>, cmd: any) {
|
|
44
|
-
if (!yinstance) return;
|
|
45
|
-
if (Array.isArray(cmd)) {
|
|
46
|
-
if (Array.isArray(cmd[0])) {
|
|
47
|
-
//2D Command
|
|
48
|
-
cmd.forEach((sub_cmd) => {
|
|
49
|
-
applycmd(yinstance, sub_cmd);
|
|
50
|
-
});
|
|
51
|
-
} else yinstance.command(cmd[0], cmd[1], cmd[2], cmd[3]);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* This lib helps you build a wordpress plugin */
|
|
2
|
-
import { do_exec, show_msg } from '../commons';
|
|
3
|
-
|
|
4
|
-
const cmd = [
|
|
5
|
-
// "$currentPath=[string](Get-Location);",
|
|
6
|
-
// "$foldername=Split-Path -Path $pwd -Leaf;",
|
|
7
|
-
// "$foldernamezip=$foldername+'.zip';",
|
|
8
|
-
// "$tempPath=$env:TEMP+'\\'+$foldername;",
|
|
9
|
-
// "$localBuildPath=$currentPath+'\\build';",
|
|
10
|
-
// "$destpath= $home+'\\Desktop\\Build';",
|
|
11
|
-
// "cd $currentPath;",
|
|
12
|
-
// "Remove-Item $tempPath -force -Recurse -ErrorAction SilentlyContinue;",
|
|
13
|
-
// "Remove-Item $localBuildPath -force -Recurse -ErrorAction SilentlyContinue;",
|
|
14
|
-
// "mkdir -p $tempPath;",
|
|
15
|
-
// "mkdir -p $localBuildPath;",
|
|
16
|
-
// "Get-ChildItem | Foreach-Object { Copy-Item -Path $_.FullName -Destination $tempPath -Recurse -Force};",
|
|
17
|
-
// "echo '>>>>>>>>>>>>>>>>>>>>>>>>>';",
|
|
18
|
-
// "echo 'cleanup target dir Dev files';",
|
|
19
|
-
// "cd $tempPath;",
|
|
20
|
-
// "Get-ChildItem node_modules -Force -ErrorAction SilentlyContinue | Foreach-Object {echo $_.FullName; Remove-Item -Path $_.FullName -Recurse -Force};",
|
|
21
|
-
// "Get-ChildItem .* -Force -ErrorAction SilentlyContinue | Foreach-Object {echo $_.FullName; Remove-Item -Path $_.FullName -Recurse -Force};",
|
|
22
|
-
// "Get-ChildItem .* -Hidden -ErrorAction SilentlyContinue | Foreach-Object {echo $_.FullName; Remove-Item -Path $_.FullName -Recurse -Force};",
|
|
23
|
-
// "Remove-Item node_modules -Recurse -Force -ErrorAction SilentlyContinue;",
|
|
24
|
-
// "Remove-Item vendor -Recurse -Force -ErrorAction SilentlyContinue;",
|
|
25
|
-
// "Remove-Item composer.json -Recurse -Force -ErrorAction SilentlyContinue;",
|
|
26
|
-
// "Remove-Item composer.lock -Recurse -Force -ErrorAction SilentlyContinue;",
|
|
27
|
-
// "echo '<<<<<<<<<<<<<<<<<<<<<<<<<';",
|
|
28
|
-
// "Remove-Item $foldernamezip -force -Recurse -ErrorAction SilentlyContinue;",
|
|
29
|
-
// "bestzip $foldernamezip ./*;",
|
|
30
|
-
// "Copy-Item $foldernamezip -destination $destpath -Recurse -Force;",
|
|
31
|
-
// "Start-Sleep -Seconds 1;",
|
|
32
|
-
// "Remove-Item $localBuildPath\\$foldername -Force -Recurse -ErrorAction SilentlyContinue;",
|
|
33
|
-
// "Remove-Item $tempPath -Force -Recurse -ErrorAction SilentlyContinue;",
|
|
34
|
-
// "echo 'done !';",
|
|
35
|
-
'[console]::beep(500,300);',
|
|
36
|
-
'exit;',
|
|
37
|
-
];
|
|
38
|
-
export function handle(args: any) {
|
|
39
|
-
show_msg('Building WP Plugin');
|
|
40
|
-
const fhandler = (data: any) => {
|
|
41
|
-
console.log(`stdout: ${data}`);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
do_exec(cmd, fhandler);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default handle;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* Automatically integrates tools */
|
|
2
|
-
import { ArgumentsCamelCase } from 'yargs';
|
|
3
|
-
import buildwp from './buildwp';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { err_unknown_action } from '../commons';
|
|
6
|
-
|
|
7
|
-
export function handle(args: ArgumentsCamelCase) {
|
|
8
|
-
if (args.wp) {
|
|
9
|
-
buildwp(args);
|
|
10
|
-
} else {
|
|
11
|
-
err_unknown_action(args);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function get_commands(): any {
|
|
16
|
-
return ['build <wp>', 'Build helper', () => {}, handle];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default get_commands;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/* This lib helps you build a wordpress plugin */
|
|
2
|
-
import { do_exec, show_msg } from '../commons';
|
|
3
|
-
|
|
4
|
-
const cmd1 = ['rimraf build && rimraf dist'];
|
|
5
|
-
export function handle(args: any) {
|
|
6
|
-
show_msg('Cleaning up build & dist files');
|
|
7
|
-
const fhandler = args.q ? undefined : console.log;
|
|
8
|
-
|
|
9
|
-
do_exec(cmd1, fhandler);
|
|
10
|
-
show_msg('Build cleanup done');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default handle;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* This lib helps you build a wordpress plugin */
|
|
2
|
-
import { do_exec, err_unknown, show_msg } from '../commons';
|
|
3
|
-
|
|
4
|
-
const cmd1 = ['rimraf ./**/node_modules'];
|
|
5
|
-
const cmd_clean_cache = ['rimraf ./**/.yarn/cache && rimraf ./**/.jest/cache'];
|
|
6
|
-
const cmd_clean_lock = ['rimraf ./**/yarn.lock && rimraf ./**/package-lock.json'];
|
|
7
|
-
|
|
8
|
-
export function handle(args: any) {
|
|
9
|
-
show_msg('Cleaning up node_module & lock files');
|
|
10
|
-
const fhandler = args.q ? undefined : console.log;
|
|
11
|
-
do_exec(cmd1, fhandler)
|
|
12
|
-
.then(() => do_exec(cmd_clean_cache, fhandler))
|
|
13
|
-
.then(() => do_exec(cmd_clean_cache, fhandler))
|
|
14
|
-
.then(() => do_exec(cmd_clean_lock, fhandler))
|
|
15
|
-
.finally(() => {
|
|
16
|
-
show_msg('Node cleanup done');
|
|
17
|
-
})
|
|
18
|
-
.catch(() => {
|
|
19
|
-
err_unknown('cleanup failed');
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default handle;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/* Automatically integrates tools */
|
|
2
|
-
import { ArgumentsCamelCase } from 'yargs';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import cleanbuild from './cleanbuild';
|
|
5
|
-
import cleannode from './cleannode';
|
|
6
|
-
import { err_unknown_action } from '../commons';
|
|
7
|
-
import yargs from 'yargs';
|
|
8
|
-
|
|
9
|
-
export function handle(args: ArgumentsCamelCase) {
|
|
10
|
-
const mode = args.mode ?? '';
|
|
11
|
-
switch (mode) {
|
|
12
|
-
case 'build':
|
|
13
|
-
cleanbuild(args);
|
|
14
|
-
break;
|
|
15
|
-
case 'node':
|
|
16
|
-
cleannode(args);
|
|
17
|
-
break;
|
|
18
|
-
case 'all':
|
|
19
|
-
cleanbuild(args);
|
|
20
|
-
cleannode(args);
|
|
21
|
-
break;
|
|
22
|
-
case '':
|
|
23
|
-
default:
|
|
24
|
-
err_unknown_action(args);
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export function get_commands(): any {
|
|
29
|
-
return ['clean <mode>', 'Modes: node,build,all', () => {}, handle];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default get_commands;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ArgumentsCamelCase } from 'yargs';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { show_msg } from './index';
|
|
4
|
-
|
|
5
|
-
export function err_unknown_action(args?: ArgumentsCamelCase | string) {
|
|
6
|
-
let argsTxt: string = '';
|
|
7
|
-
if (typeof args === 'string') {
|
|
8
|
-
argsTxt = args;
|
|
9
|
-
} else argsTxt = JSON.stringify(args);
|
|
10
|
-
show_msg(chalk.red.bold('Unknown command : ') + ' ' + chalk.gray(argsTxt), 'error');
|
|
11
|
-
}
|
|
12
|
-
export function err_unknown(args?: ArgumentsCamelCase | string) {
|
|
13
|
-
let argsTxt: string = '';
|
|
14
|
-
if (typeof args === 'string') {
|
|
15
|
-
argsTxt = args;
|
|
16
|
-
} else argsTxt = JSON.stringify(args);
|
|
17
|
-
show_msg(chalk.red.bold('Unknown error : ') + ' ' + chalk.gray(argsTxt), 'error');
|
|
18
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const { exec } = require('child_process');
|
|
2
|
-
|
|
3
|
-
import { FailedExec, SuccessfulExec } from 'shell-exec';
|
|
4
|
-
|
|
5
|
-
import shellExec from 'shell-exec';
|
|
6
|
-
|
|
7
|
-
type fnc = (...args: any[]) => void;
|
|
8
|
-
|
|
9
|
-
export function do_exec(cmd: string | string[], stdout?: fnc, stderr?: fnc, onclose?: fnc): Promise<any> {
|
|
10
|
-
const str_cmd = Array.isArray(cmd) ? cmd.join(' ') : cmd;
|
|
11
|
-
if (!str_cmd || str_cmd.length <= 0) return Promise.reject(new Error());
|
|
12
|
-
const shellcmd = shellExec(str_cmd);
|
|
13
|
-
shellcmd.then((r: any) => {
|
|
14
|
-
if (stdout && r.stdout) {
|
|
15
|
-
stdout(r.stdout);
|
|
16
|
-
}
|
|
17
|
-
if (stderr && r.stderr) {
|
|
18
|
-
stderr(r.stderr);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
if (onclose) shellcmd.finally(onclose);
|
|
22
|
-
return shellcmd;
|
|
23
|
-
// const dir = spawn(str_cmd);
|
|
24
|
-
// if (stdout) dir.stdout.on('data', stdout);
|
|
25
|
-
// if (stderr) dir.stderr.on('data', stderr);
|
|
26
|
-
// if (onclose) dir.on('close', onclose);
|
|
27
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import ora from 'ora-classic';
|
|
3
|
-
|
|
4
|
-
export function show_loading(txt?: string) {
|
|
5
|
-
// const spinner = ora(txt).start();
|
|
6
|
-
// setTimeout(() => {
|
|
7
|
-
// spinner.clear();
|
|
8
|
-
// spinner.stop();
|
|
9
|
-
// }, 4000);
|
|
10
|
-
}
|
|
11
|
-
export function show_msg(txt: string, type?: string) {
|
|
12
|
-
const prefix_text = '[az-cli]';
|
|
13
|
-
let prefix = chalk.bgRed.green(prefix_text);
|
|
14
|
-
|
|
15
|
-
switch (type) {
|
|
16
|
-
case '':
|
|
17
|
-
default:
|
|
18
|
-
prefix = chalk.bgGreen(prefix_text);
|
|
19
|
-
console.info(prefix + ' ' + chalk.gray(txt));
|
|
20
|
-
break;
|
|
21
|
-
case 'error':
|
|
22
|
-
prefix = chalk.bgRed(prefix_text);
|
|
23
|
-
console.error(prefix + ' ' + chalk.gray(txt));
|
|
24
|
-
break;
|
|
25
|
-
}
|
|
26
|
-
}
|
package/src/libs/integ/index.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/* Automatically integrates tools */
|
|
2
|
-
import { ArgumentsCamelCase } from 'yargs';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { err_unknown_action } from '../commons';
|
|
5
|
-
import yargs from 'yargs';
|
|
6
|
-
import yarnb from './yarnb';
|
|
7
|
-
import yarni from './yarni';
|
|
8
|
-
import yarnt from './yarnt';
|
|
9
|
-
|
|
10
|
-
export function get_commands(): any {
|
|
11
|
-
return [
|
|
12
|
-
['yarni', 'YarnInstall', () => {}, yarni],
|
|
13
|
-
['yarnb', 'YarnBuild', () => {}, yarnb],
|
|
14
|
-
['yarnt', 'YarnTest', () => {}, yarnt],
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default get_commands;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { do_exec, err_unknown, show_msg } from '../commons';
|
|
2
|
-
|
|
3
|
-
const cmd1 = ['yarn run build'];
|
|
4
|
-
export function handle(args: any) {
|
|
5
|
-
show_msg('YarnBuild');
|
|
6
|
-
const fhandler = args.q ? undefined : console.log;
|
|
7
|
-
return do_exec(cmd1, fhandler)
|
|
8
|
-
.finally(() => {
|
|
9
|
-
show_msg('YarnBuild done');
|
|
10
|
-
})
|
|
11
|
-
.catch(() => {
|
|
12
|
-
err_unknown('YarnBuild failed');
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default handle;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { do_exec, err_unknown, show_msg } from '../commons';
|
|
2
|
-
|
|
3
|
-
const cmd1 = ['yarn install'];
|
|
4
|
-
export function handle(args: any) {
|
|
5
|
-
show_msg('YarnInstall');
|
|
6
|
-
const fhandler = args.q ? undefined : console.log;
|
|
7
|
-
return do_exec(cmd1, fhandler)
|
|
8
|
-
.finally(() => {
|
|
9
|
-
show_msg('YarnInstall done');
|
|
10
|
-
})
|
|
11
|
-
.catch(() => {
|
|
12
|
-
err_unknown('YarnInstall failed');
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default handle;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { do_exec, err_unknown, show_msg } from '../commons';
|
|
2
|
-
|
|
3
|
-
const cmd1 = ['yarn run test'];
|
|
4
|
-
export function handle(args: any) {
|
|
5
|
-
show_msg('YarnTest');
|
|
6
|
-
const fhandler = args.q ? undefined : console.log;
|
|
7
|
-
return do_exec(cmd1, fhandler)
|
|
8
|
-
.finally(() => {
|
|
9
|
-
show_msg('YarnTest done');
|
|
10
|
-
})
|
|
11
|
-
.catch(() => {
|
|
12
|
-
err_unknown('YarnTest failed');
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default handle;
|
package/tsconfig.json
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
-
|
|
5
|
-
/* Projects */
|
|
6
|
-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
7
|
-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
-
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
9
|
-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
10
|
-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
-
|
|
13
|
-
/* Language and Environment */
|
|
14
|
-
"target": "esnext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
15
|
-
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
16
|
-
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
17
|
-
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
18
|
-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
19
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
20
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
21
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
22
|
-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
23
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
24
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
25
|
-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
26
|
-
|
|
27
|
-
/* Modules */
|
|
28
|
-
"module": "esnext" /* Specify what module code is generated. */,
|
|
29
|
-
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
30
|
-
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
|
31
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
32
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
33
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
34
|
-
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
35
|
-
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
36
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
37
|
-
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
38
|
-
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
39
|
-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
40
|
-
|
|
41
|
-
/* JavaScript Support */
|
|
42
|
-
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
43
|
-
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
44
|
-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
45
|
-
|
|
46
|
-
/* Emit */
|
|
47
|
-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
48
|
-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
49
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
50
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
51
|
-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
52
|
-
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
53
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
54
|
-
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
55
|
-
"importHelpers": true /* Allow importing helper functions from tslib once per project, instead of including them per-file. */,
|
|
56
|
-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
|
57
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
58
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
59
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
60
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
61
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
62
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
63
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
64
|
-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
65
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
66
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
67
|
-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
68
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
69
|
-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
70
|
-
|
|
71
|
-
/* Interop Constraints */
|
|
72
|
-
//"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
|
|
73
|
-
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
|
|
74
|
-
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
|
|
75
|
-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
76
|
-
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
77
|
-
|
|
78
|
-
/* Type Checking */
|
|
79
|
-
"strict": true /* Enable all strict type-checking options. */,
|
|
80
|
-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
81
|
-
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
82
|
-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
83
|
-
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
84
|
-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
85
|
-
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
86
|
-
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
87
|
-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
88
|
-
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
89
|
-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
90
|
-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
91
|
-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
92
|
-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
93
|
-
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
94
|
-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
95
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
96
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
97
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
98
|
-
|
|
99
|
-
/* Completeness */
|
|
100
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
101
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
102
|
-
},
|
|
103
|
-
"lib": ["esnext"],
|
|
104
|
-
"exclude": ["node_modules", "__tests__", "dist", "build"]
|
|
105
|
-
}
|