@oriflame/config-typescript 5.1.12-alpha.9 → 5.1.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/dts/index.d.ts +19 -19
- package/lib/index.js +10 -7
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +10 -8
package/dts/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { TypeScriptConfig } from '@beemo/driver-typescript';
|
|
2
|
-
export interface TypeScriptOptions {
|
|
3
|
-
sourceMaps?: boolean;
|
|
4
|
-
library?: boolean;
|
|
5
|
-
future?: boolean;
|
|
6
|
-
react?: boolean;
|
|
7
|
-
srcFolder: string;
|
|
8
|
-
typesFolder: string;
|
|
9
|
-
workspaces?: boolean;
|
|
10
|
-
allowJs?: boolean;
|
|
11
|
-
includeTests?: boolean;
|
|
12
|
-
testsFolder: string;
|
|
13
|
-
buildFolder: string;
|
|
14
|
-
declarationFolder?: string;
|
|
15
|
-
|
|
16
|
-
skipLibCheck?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function getCompilerOptions({ library, future, react, srcFolder, allowJs, skipLibCheck, sourceMaps,
|
|
19
|
-
export declare function getConfig(options: TypeScriptOptions): TypeScriptConfig;
|
|
1
|
+
import type { TypeScriptConfig } from '@beemo/driver-typescript';
|
|
2
|
+
export interface TypeScriptOptions {
|
|
3
|
+
sourceMaps?: boolean;
|
|
4
|
+
library?: boolean;
|
|
5
|
+
future?: boolean;
|
|
6
|
+
react?: boolean;
|
|
7
|
+
srcFolder: string;
|
|
8
|
+
typesFolder: string;
|
|
9
|
+
workspaces?: boolean;
|
|
10
|
+
allowJs?: boolean;
|
|
11
|
+
includeTests?: boolean;
|
|
12
|
+
testsFolder: string;
|
|
13
|
+
buildFolder: string;
|
|
14
|
+
declarationFolder?: string;
|
|
15
|
+
declarationOnly?: boolean;
|
|
16
|
+
skipLibCheck?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function getCompilerOptions({ library, future, react, srcFolder, allowJs, skipLibCheck, sourceMaps, declarationOnly, declarationFolder, buildFolder, includeTests, workspaces, }: Partial<TypeScriptOptions>): import("@beemo/driver-typescript").CompilerOptions;
|
|
19
|
+
export declare function getConfig(options: TypeScriptOptions): TypeScriptConfig;
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -18,7 +18,7 @@ function getCompilerOptions({
|
|
|
18
18
|
allowJs = false,
|
|
19
19
|
skipLibCheck = false,
|
|
20
20
|
sourceMaps = true,
|
|
21
|
-
|
|
21
|
+
declarationOnly = false,
|
|
22
22
|
declarationFolder,
|
|
23
23
|
buildFolder,
|
|
24
24
|
includeTests,
|
|
@@ -33,7 +33,6 @@ function getCompilerOptions({
|
|
|
33
33
|
compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
|
|
34
34
|
compilerOptions.allowJs = allowJs;
|
|
35
35
|
compilerOptions.skipLibCheck = skipLibCheck;
|
|
36
|
-
compilerOptions.declaration = library || emitDeclarationOnly;
|
|
37
36
|
|
|
38
37
|
if (react) {
|
|
39
38
|
var _compilerOptions$lib;
|
|
@@ -54,15 +53,19 @@ function getCompilerOptions({
|
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
if (!workspaces) {
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
if (!includeTests) {
|
|
57
|
+
compilerOptions.rootDir = srcFolder;
|
|
58
|
+
compilerOptions.emitDeclarationOnly = declarationOnly;
|
|
59
|
+
compilerOptions.declaration = library || declarationOnly;
|
|
60
|
+
compilerOptions.declarationMap = library || declarationOnly;
|
|
61
|
+
compilerOptions.outDir = buildFolder;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
compilerOptions.composite = library;
|
|
59
65
|
}
|
|
60
66
|
|
|
61
|
-
compilerOptions.composite = library && !workspaces;
|
|
62
|
-
|
|
63
67
|
if (sourceMaps) {
|
|
64
68
|
compilerOptions.sourceMap = true;
|
|
65
|
-
compilerOptions.declarationMap = true;
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
return compilerOptions;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":null,"names":["config","require","compilerOptions","getCompilerOptions","library","future","react","srcFolder","allowJs","skipLibCheck","sourceMaps","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":null,"names":["config","require","compilerOptions","getCompilerOptions","library","future","react","srcFolder","allowJs","skipLibCheck","sourceMaps","declarationOnly","declarationFolder","buildFolder","includeTests","workspaces","Object","assign","isolatedModules","useDefineForClassFields","process","env","NODE_ENV","lib","jsx","baseUrl","paths","ALIAS_PATTERN","declarationDir","rootDir","emitDeclarationOnly","declaration","declarationMap","outDir","composite","sourceMap","getConfig","options","typesFolder","testsFolder","tsconfig","include","exclude","push"],"mappings":";;;;;;AAGA,MAAMA,MAAM,GAAGC,OAAO,CAAC,iCAAD,CAAtB;;AAEA,MAAMC,eAAe,GAAGF,MAAM,CAACE,eAA/B;AAmBO,SAASC,kBAAT,CAA4B;AACjCC,EAAAA,OAAO,GAAG,KADuB;AAEjCC,EAAAA,MAAM,GAAG,KAFwB;AAGjCC,EAAAA,KAAK,GAAG,KAHyB;AAIjCC,EAAAA,SAAS,GAAG,KAJqB;AAKjCC,EAAAA,OAAO,GAAG,KALuB;AAMjCC,EAAAA,YAAY,GAAG,KANkB;AAOjCC,EAAAA,UAAU,GAAG,IAPoB;AAQjCC,EAAAA,eAAe,GAAG,KARe;AASjCC,EAAAA,iBATiC;AAUjCC,EAAAA,WAViC;AAWjCC,EAAAA,YAXiC;AAYjCC,EAAAA;AAZiC,CAA5B,EAawB;AAC7B,MAAIA,UAAJ,EAAgB;AACdC,IAAAA,MAAM,CAACC,MAAP,CACEf,eADF,EAEGD,OAAO,CAAC,4CAAD,CAAR,CAA4EC,eAF9E;AAID,GAN4B;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ED,MAAIM,UAAJ,EAAgB;AACdR,IAAAA,eAAe,CAACiC,SAAhB,GAA4B,IAA5B;AACD;;AAED,SAAOjC,eAAP;AACD;AAEM,SAASkC,SAAT,CAAmBC,OAAnB,EAAiE;AACtE,QAAM;AAAEtB,IAAAA,UAAF;AAAcR,IAAAA,SAAd;AAAyB+B,IAAAA,WAAzB;AAAsCxB,IAAAA,YAAtC;AAAoDyB,IAAAA;AAApD,MAAoEF,OAA1E;;AACA,MAAItB,UAAJ,EAAgB;AACd,WAAO;AACLb,MAAAA,eAAe,EAAEC,kBAAkB,CAACkC,OAAD;AAD9B,KAAP;AAGD;;AAED,QAAMG,QAAQ,GAAG;AACftC,IAAAA,eAAe,EAAEC,kBAAkB,CAACkC,OAAD,CADpB;AAEfI,IAAAA,OAAO,EAAE,CAAE,KAAIlC,SAAU,OAAhB,EAAyB,KAAI+B,WAAY,OAAzC,CAFM;AAGfI,IAAAA,OAAO,EAAE,CAAC,mBAAD;AAHM,GAAjB;;AAMA,MAAI5B,YAAJ,EAAkB;AAChB0B,IAAAA,QAAQ,CAACC,OAAT,CAAiBE,IAAjB,CAAuB,KAAIJ,WAAY,OAAvC;AACD;;AAED,SAAOC,QAAP;AACD;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oriflame/config-typescript",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.15",
|
|
4
4
|
"description": "Reusable typescript config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lumos",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"src/**/*.{ts,tsx,json}"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@oriflame/lumos-common": "^5.1.
|
|
32
|
-
"tsconfig-oriflame": "^5.1.
|
|
31
|
+
"@oriflame/lumos-common": "^5.1.15",
|
|
32
|
+
"tsconfig-oriflame": "^5.1.15"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@beemo/core": "^2.1.3",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"format": "lib",
|
|
46
46
|
"platform": "node"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "fe6a2b6df37b85322e9cb0c6d8f095b88c0a7149"
|
|
49
49
|
}
|
package/src/index.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface TypeScriptOptions {
|
|
|
18
18
|
testsFolder: string;
|
|
19
19
|
buildFolder: string;
|
|
20
20
|
declarationFolder?: string;
|
|
21
|
-
|
|
21
|
+
declarationOnly?: boolean;
|
|
22
22
|
skipLibCheck?: boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ export function getCompilerOptions({
|
|
|
30
30
|
allowJs = false,
|
|
31
31
|
skipLibCheck = false,
|
|
32
32
|
sourceMaps = true,
|
|
33
|
-
|
|
33
|
+
declarationOnly = false,
|
|
34
34
|
declarationFolder,
|
|
35
35
|
buildFolder,
|
|
36
36
|
includeTests,
|
|
@@ -47,7 +47,6 @@ export function getCompilerOptions({
|
|
|
47
47
|
compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
|
|
48
48
|
compilerOptions.allowJs = allowJs;
|
|
49
49
|
compilerOptions.skipLibCheck = skipLibCheck;
|
|
50
|
-
compilerOptions.declaration = library || emitDeclarationOnly;
|
|
51
50
|
|
|
52
51
|
if (react) {
|
|
53
52
|
compilerOptions.lib = [...(compilerOptions.lib ?? []), 'dom.iterable'];
|
|
@@ -66,15 +65,18 @@ export function getCompilerOptions({
|
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
if (!workspaces) {
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
if (!includeTests) {
|
|
69
|
+
compilerOptions.rootDir = srcFolder;
|
|
70
|
+
compilerOptions.emitDeclarationOnly = declarationOnly;
|
|
71
|
+
compilerOptions.declaration = library || declarationOnly;
|
|
72
|
+
compilerOptions.declarationMap = library || declarationOnly;
|
|
73
|
+
compilerOptions.outDir = buildFolder;
|
|
74
|
+
}
|
|
75
|
+
compilerOptions.composite = library;
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
compilerOptions.composite = library && !workspaces;
|
|
74
|
-
|
|
75
78
|
if (sourceMaps) {
|
|
76
79
|
compilerOptions.sourceMap = true;
|
|
77
|
-
compilerOptions.declarationMap = true;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
return compilerOptions;
|