@tsparticles/cli 3.0.13 → 3.0.15
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/.github/workflows/node.js-ci.yml +13 -7
- package/dist/build/build-bundle.d.ts +5 -0
- package/dist/build/build-circular-deps.d.ts +6 -0
- package/dist/build/build-clear.d.ts +5 -0
- package/dist/build/build-distfiles.d.ts +5 -0
- package/dist/build/build-distfiles.js +7 -8
- package/dist/build/build-diststats.d.ts +12 -0
- package/dist/build/build-eslint.d.ts +5 -0
- package/dist/build/build-eslint.js +1 -3
- package/dist/build/build-prettier.d.ts +25 -0
- package/dist/build/build-prettier.js +4 -4
- package/dist/build/build-tsc.d.ts +5 -0
- package/dist/build/build.d.ts +3 -0
- package/dist/cli.d.ts +2 -0
- package/dist/create/create.d.ts +3 -0
- package/dist/create/plugin/create-plugin.d.ts +8 -0
- package/dist/create/plugin/plugin.d.ts +3 -0
- package/dist/create/preset/create-preset.d.ts +8 -0
- package/dist/create/preset/preset.d.ts +3 -0
- package/dist/create/shape/create-shape.d.ts +8 -0
- package/dist/create/shape/shape.d.ts +3 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils/file-utils.d.ts +28 -0
- package/dist/utils/string-utils.d.ts +20 -0
- package/dist/utils/template-utils.d.ts +47 -0
- package/files/create-plugin/src/PluginInstance.ts +4 -2
- package/files/create-plugin/src/index.ts +1 -1
- package/files/create-plugin/src/plugin.ts +6 -6
- package/files/empty-project/.browserslistrc +1 -1
- package/files/empty-project/package.dist.json +1 -1
- package/files/empty-project/package.json +9 -9
- package/files/empty-project/tsconfig.base.json +2 -1
- package/package.json +14 -14
- package/src/build/build-bundle.ts +34 -34
- package/src/build/build-circular-deps.ts +23 -23
- package/src/build/build-clear.ts +11 -11
- package/src/build/build-distfiles.ts +67 -70
- package/src/build/build-diststats.ts +41 -41
- package/src/build/build-eslint.ts +26 -28
- package/src/build/build-prettier.ts +166 -166
- package/src/build/build-tsc.ts +146 -149
- package/src/build/build.ts +116 -116
- package/src/cli.ts +3 -3
- package/src/create/plugin/create-plugin.ts +108 -111
- package/src/create/plugin/plugin.ts +31 -31
- package/src/create/preset/create-preset.ts +123 -126
- package/src/create/preset/preset.ts +31 -31
- package/src/create/shape/create-shape.ts +112 -115
- package/src/create/shape/shape.ts +31 -31
- package/src/tsconfig.json +7 -125
- package/src/utils/file-utils.ts +35 -35
- package/src/utils/string-utils.ts +13 -13
- package/src/utils/template-utils.ts +130 -130
- package/tests/create-plugin.test.ts +11 -3
- package/tests/create-preset.test.ts +10 -2
- package/tests/create-shape.test.ts +10 -2
- package/tests/tsconfig.json +3 -15
- package/tsconfig.json +53 -20
- package/.mocharc.json +0 -11
- package/tsconfig.eslint.json +0 -8
|
@@ -10,38 +10,38 @@ const presetCommand = new Command("preset");
|
|
|
10
10
|
presetCommand.description("Create a new tsParticles preset");
|
|
11
11
|
presetCommand.argument("<destination>", "Destination folder");
|
|
12
12
|
presetCommand.action(async (destination: string) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
13
|
+
const destPath = await getDestinationDir(destination),
|
|
14
|
+
repoUrl = await getRepositoryUrl(),
|
|
15
|
+
initialName = destPath.split(path.sep).pop(),
|
|
16
|
+
questions: PromptObject[] = [
|
|
17
|
+
{
|
|
18
|
+
type: "text",
|
|
19
|
+
name: "name",
|
|
20
|
+
message: "What is the name of the preset?",
|
|
21
|
+
validate: (value: string) => (value ? true : "The name can't be empty"),
|
|
22
|
+
initial: initialName,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: "text",
|
|
26
|
+
name: "description",
|
|
27
|
+
message: "What is the description of the preset?",
|
|
28
|
+
validate: (value: string) => (value ? true : "The description can't be empty"),
|
|
29
|
+
initial: capitalize(initialName ?? ""),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "text",
|
|
33
|
+
name: "repositoryUrl",
|
|
34
|
+
message: "What is the repository URL? (optional)",
|
|
35
|
+
initial: repoUrl.trim(),
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
{ name, description, repositoryUrl } = (await prompts(questions)) as {
|
|
39
|
+
description: string;
|
|
40
|
+
name: string;
|
|
41
|
+
repositoryUrl: string;
|
|
42
|
+
};
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
await createPresetTemplate(name.trim(), description.trim(), repositoryUrl.trim(), destPath);
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
export { presetCommand };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { camelize, capitalize, dash } from "../../utils/string-utils.js";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
copyEmptyTemplateFiles,
|
|
4
|
+
copyFilter,
|
|
5
|
+
runBuild,
|
|
6
|
+
runInstall,
|
|
7
|
+
updatePackageDistFile,
|
|
8
|
+
updatePackageFile,
|
|
9
|
+
updateWebpackFile,
|
|
10
10
|
} from "../../utils/template-utils.js";
|
|
11
11
|
import fs from "fs-extra";
|
|
12
12
|
import path from "path";
|
|
@@ -18,28 +18,28 @@ import { replaceTokensInFile } from "../../utils/file-utils.js";
|
|
|
18
18
|
* @param name - The name of the project
|
|
19
19
|
*/
|
|
20
20
|
async function updateIndexFile(destPath: string, name: string): Promise<void> {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const capitalizedName = capitalize(name, "-", " "),
|
|
22
|
+
camelizedName = camelize(capitalizedName);
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
await replaceTokensInFile({
|
|
25
|
+
path: path.join(destPath, "src", "index.ts"),
|
|
26
|
+
tokens: [
|
|
27
|
+
{
|
|
28
|
+
from: /loadTemplateShape/g,
|
|
29
|
+
to: `load${capitalizedName}Shape`,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
await replaceTokensInFile({
|
|
35
|
+
path: path.join(destPath, "src", "ShapeDrawer.ts"),
|
|
36
|
+
tokens: [
|
|
37
|
+
{
|
|
38
|
+
from: /"#template#"/g,
|
|
39
|
+
to: `"${camelizedName}"`,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -50,21 +50,21 @@ async function updateIndexFile(destPath: string, name: string): Promise<void> {
|
|
|
50
50
|
* @param repoUrl - The repository url
|
|
51
51
|
*/
|
|
52
52
|
async function updateShapePackageFile(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
destPath: string,
|
|
54
|
+
name: string,
|
|
55
|
+
description: string,
|
|
56
|
+
repoUrl: string,
|
|
57
57
|
): Promise<void> {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const camelizedName = camelize(camelize(name, "-"), " "),
|
|
59
|
+
dashedName = dash(camelizedName);
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
await updatePackageFile(
|
|
62
|
+
destPath,
|
|
63
|
+
`tsparticles-shape-${dashedName}`,
|
|
64
|
+
description,
|
|
65
|
+
`tsparticles.shape.${camelizedName}.min.js`,
|
|
66
|
+
repoUrl,
|
|
67
|
+
);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -75,21 +75,21 @@ async function updateShapePackageFile(
|
|
|
75
75
|
* @param repoUrl - The repository url
|
|
76
76
|
*/
|
|
77
77
|
async function updateShapePackageDistFile(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
destPath: string,
|
|
79
|
+
name: string,
|
|
80
|
+
description: string,
|
|
81
|
+
repoUrl: string,
|
|
82
82
|
): Promise<void> {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
const camelizedName = camelize(camelize(name, "-"), " "),
|
|
84
|
+
dashedName = dash(camelizedName);
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
await updatePackageDistFile(
|
|
87
|
+
destPath,
|
|
88
|
+
`tsparticles-shape-${dashedName}`,
|
|
89
|
+
description,
|
|
90
|
+
`tsparticles.shape.${camelizedName}.min.js`,
|
|
91
|
+
repoUrl,
|
|
92
|
+
);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
@@ -100,51 +100,48 @@ async function updateShapePackageDistFile(
|
|
|
100
100
|
* @param repoUrl - The repository url
|
|
101
101
|
*/
|
|
102
102
|
async function updateReadmeFile(destPath: string, name: string, description: string, repoUrl: string): Promise<void> {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
repoUrl.indexOf(".git"),
|
|
112
|
-
)
|
|
113
|
-
: "tsparticles/shape-template";
|
|
103
|
+
const capitalizedName = capitalize(name, "-", " "),
|
|
104
|
+
camelizedName = camelize(capitalizedName),
|
|
105
|
+
dashedName = dash(camelizedName),
|
|
106
|
+
stringSearch = "github.com",
|
|
107
|
+
trailingSlashSearch = "github.com/",
|
|
108
|
+
repoPath = repoUrl.includes(stringSearch)
|
|
109
|
+
? repoUrl.substring(repoUrl.indexOf(trailingSlashSearch) + trailingSlashSearch.length, repoUrl.indexOf(".git"))
|
|
110
|
+
: "tsparticles/shape-template";
|
|
114
111
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
112
|
+
await replaceTokensInFile({
|
|
113
|
+
path: path.join(destPath, "README.md"),
|
|
114
|
+
tokens: [
|
|
115
|
+
{
|
|
116
|
+
from: /tsParticles Template Shape/g,
|
|
117
|
+
to: `tsParticles ${description} Shape`,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
from: /tsparticles-shape-template/g,
|
|
121
|
+
to: `tsparticles-shape-${dashedName}`,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
from: /tsparticles\.shape\.template(\.bundle)?\.min\.js/g,
|
|
125
|
+
to: `tsparticles.shape.${camelizedName}$1.min.js`,
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
from: /loadTemplateShape/g,
|
|
129
|
+
to: `load${capitalizedName}Shape`,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
from: /\[tsParticles]\(https:\/\/github.com\/matteobruni\/tsparticles\) additional template shape\./g,
|
|
133
|
+
to: `[tsParticles](https://github.com/matteobruni/tsparticles) additional ${name} shape.`,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
from: /shape\.type: "template"/g,
|
|
137
|
+
to: `shape.type: "${camelizedName}`,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
from: /!\[demo]\(https:\/\/raw.githubusercontent.com\/tsparticles\/shape-template\/main\/images\/sample.png\)/g,
|
|
141
|
+
to: ``,
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
});
|
|
148
145
|
}
|
|
149
146
|
|
|
150
147
|
/**
|
|
@@ -154,7 +151,7 @@ async function updateReadmeFile(destPath: string, name: string, description: str
|
|
|
154
151
|
* @param description - The description of the project
|
|
155
152
|
*/
|
|
156
153
|
async function updateShapeWebpackFile(destPath: string, name: string, description: string): Promise<void> {
|
|
157
|
-
|
|
154
|
+
await updateWebpackFile(destPath, camelize(capitalize(name, "-", " ")), description, "loadParticlesShape");
|
|
158
155
|
}
|
|
159
156
|
|
|
160
157
|
/**
|
|
@@ -165,26 +162,26 @@ async function updateShapeWebpackFile(destPath: string, name: string, descriptio
|
|
|
165
162
|
* @param destPath - The path where the project is located
|
|
166
163
|
*/
|
|
167
164
|
export async function createShapeTemplate(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
name: string,
|
|
166
|
+
description: string,
|
|
167
|
+
repoUrl: string,
|
|
168
|
+
destPath: string,
|
|
172
169
|
): Promise<void> {
|
|
173
|
-
|
|
170
|
+
const sourcePath = path.join(__dirname, "..", "..", "..", "files", "create-shape");
|
|
174
171
|
|
|
175
|
-
|
|
172
|
+
await copyEmptyTemplateFiles(destPath);
|
|
176
173
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
await fs.copy(sourcePath, destPath, {
|
|
175
|
+
overwrite: true,
|
|
176
|
+
filter: copyFilter,
|
|
177
|
+
});
|
|
181
178
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
179
|
+
await updateIndexFile(destPath, name);
|
|
180
|
+
await updateShapePackageFile(destPath, name, description, repoUrl);
|
|
181
|
+
await updateShapePackageDistFile(destPath, name, description, repoUrl);
|
|
182
|
+
await updateReadmeFile(destPath, name, description, repoUrl);
|
|
183
|
+
await updateShapeWebpackFile(destPath, name, description);
|
|
187
184
|
|
|
188
|
-
|
|
189
|
-
|
|
185
|
+
await runInstall(destPath);
|
|
186
|
+
await runBuild(destPath);
|
|
190
187
|
}
|
|
@@ -10,38 +10,38 @@ const shapeCommand = new Command("shape");
|
|
|
10
10
|
shapeCommand.description("Create a new tsParticles shape");
|
|
11
11
|
shapeCommand.argument("<destination>", "Destination folder");
|
|
12
12
|
shapeCommand.action(async (destination: string) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
13
|
+
const destPath = await getDestinationDir(destination),
|
|
14
|
+
repoUrl = await getRepositoryUrl(),
|
|
15
|
+
initialName = destPath.split(path.sep).pop(),
|
|
16
|
+
questions: PromptObject[] = [
|
|
17
|
+
{
|
|
18
|
+
type: "text",
|
|
19
|
+
name: "name",
|
|
20
|
+
message: "What is the name of the shape?",
|
|
21
|
+
validate: (value: string) => (value ? true : "The name can't be empty"),
|
|
22
|
+
initial: initialName,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: "text",
|
|
26
|
+
name: "description",
|
|
27
|
+
message: "What is the description of the shape?",
|
|
28
|
+
validate: (value: string) => (value ? true : "The description can't be empty"),
|
|
29
|
+
initial: capitalize(initialName ?? ""),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "text",
|
|
33
|
+
name: "repositoryUrl",
|
|
34
|
+
message: "What is the repository URL? (optional)",
|
|
35
|
+
initial: repoUrl.trim(),
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
{ name, description, repositoryUrl } = (await prompts(questions)) as {
|
|
39
|
+
description: string;
|
|
40
|
+
name: string;
|
|
41
|
+
repositoryUrl: string;
|
|
42
|
+
};
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
await createShapeTemplate(name.trim(), description.trim(), repositoryUrl.trim(), destPath);
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
export { shapeCommand };
|
package/src/tsconfig.json
CHANGED
|
@@ -1,127 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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",
|
|
15
|
-
/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
16
|
-
"lib": [
|
|
17
|
-
"ESNext",
|
|
18
|
-
"ES2024",
|
|
19
|
-
"ES2023",
|
|
20
|
-
"ES2022",
|
|
21
|
-
"ES2021",
|
|
22
|
-
"ES2020",
|
|
23
|
-
"ES2019",
|
|
24
|
-
"ES2018",
|
|
25
|
-
"ES2017",
|
|
26
|
-
"ES2016",
|
|
27
|
-
"ES2015"
|
|
28
|
-
],
|
|
29
|
-
/* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
30
|
-
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
31
|
-
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
32
|
-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
33
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
34
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
35
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
36
|
-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
37
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
38
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
39
|
-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
40
|
-
|
|
41
|
-
/* Modules */
|
|
42
|
-
"module": "NodeNext",
|
|
43
|
-
/* Specify what module code is generated. */
|
|
44
|
-
"rootDir": ".",
|
|
45
|
-
/* Specify the root folder within your source files. */
|
|
46
|
-
"moduleResolution": "NodeNext",
|
|
47
|
-
/* Specify how TypeScript looks up a file from a given module specifier. */
|
|
48
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
49
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
50
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
51
|
-
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
52
|
-
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
53
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
54
|
-
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
55
|
-
"resolveJsonModule": true,
|
|
56
|
-
/* Enable importing .json files. */
|
|
57
|
-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
58
|
-
|
|
59
|
-
/* JavaScript Support */
|
|
60
|
-
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
61
|
-
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
62
|
-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
63
|
-
|
|
64
|
-
/* Emit */
|
|
65
|
-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
66
|
-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
67
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
68
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
69
|
-
// "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. */
|
|
70
|
-
"outDir": "../dist",
|
|
71
|
-
/* Specify an output folder for all emitted files. */
|
|
72
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
73
|
-
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
74
|
-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
75
|
-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
|
76
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
77
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
78
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
79
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
80
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
81
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
82
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
83
|
-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
84
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
85
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
86
|
-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
87
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
88
|
-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
89
|
-
|
|
90
|
-
/* Interop Constraints */
|
|
91
|
-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
92
|
-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
93
|
-
"esModuleInterop": true,
|
|
94
|
-
/* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
95
|
-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
96
|
-
"forceConsistentCasingInFileNames": true,
|
|
97
|
-
/* Ensure that casing is correct in imports. */
|
|
98
|
-
|
|
99
|
-
/* Type Checking */
|
|
100
|
-
"strict": true,
|
|
101
|
-
/* Enable all strict type-checking options. */
|
|
102
|
-
"noImplicitAny": true /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
|
|
103
|
-
"strictNullChecks": true /* When type checking, take into account 'null' and 'undefined'. */,
|
|
104
|
-
"strictFunctionTypes": true /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */,
|
|
105
|
-
"strictBindCallApply": true /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */,
|
|
106
|
-
"strictPropertyInitialization": true /* Check for class properties that are declared but not set in the constructor. */,
|
|
107
|
-
"noImplicitThis": true /* Enable error reporting when 'this' is given the type 'any'. */,
|
|
108
|
-
"useUnknownInCatchVariables": true /* Default catch clause variables as 'unknown' instead of 'any'. */,
|
|
109
|
-
"alwaysStrict": true /* Ensure 'use strict' is always emitted. */,
|
|
110
|
-
"noUnusedLocals": true /* Enable error reporting when local variables aren't read. */,
|
|
111
|
-
"noUnusedParameters": true /* Raise an error when a function parameter isn't read. */,
|
|
112
|
-
"exactOptionalPropertyTypes": true /* Interpret optional property types as written, rather than adding 'undefined'. */,
|
|
113
|
-
"noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */,
|
|
114
|
-
"noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */,
|
|
115
|
-
"noUncheckedIndexedAccess": true /* Add 'undefined' to a type when accessed using an index. */,
|
|
116
|
-
"noImplicitOverride": true /* Ensure overriding members in derived classes are marked with an override modifier. */,
|
|
117
|
-
"noPropertyAccessFromIndexSignature": true /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
118
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
119
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
120
|
-
|
|
121
|
-
/* Completeness */
|
|
122
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
123
|
-
// "skipLibCheck": true
|
|
124
|
-
/* Skip type checking all .d.ts files. */
|
|
125
|
-
},
|
|
126
|
-
"references": [{ "path": "../" }]
|
|
2
|
+
"extends": "../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": ".",
|
|
5
|
+
"outDir": "../dist"
|
|
6
|
+
},
|
|
7
|
+
"references": [{ "path": "../" }],
|
|
8
|
+
"include": ["**/*"]
|
|
127
9
|
}
|