@oriflame/config-typescript 5.1.12-alpha.2 → 5.1.12-alpha.9
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 +3 -2
- package/lib/index.js +10 -3
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +12 -4
package/dts/index.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ export interface TypeScriptOptions {
|
|
|
10
10
|
allowJs?: boolean;
|
|
11
11
|
includeTests?: boolean;
|
|
12
12
|
testsFolder: string;
|
|
13
|
-
|
|
13
|
+
buildFolder: string;
|
|
14
|
+
declarationFolder?: string;
|
|
14
15
|
emitDeclarationOnly?: boolean;
|
|
15
16
|
skipLibCheck?: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare function getCompilerOptions({ library, future, react, srcFolder, allowJs, skipLibCheck, sourceMaps, emitDeclarationOnly,
|
|
18
|
+
export declare function getCompilerOptions({ library, future, react, srcFolder, allowJs, skipLibCheck, sourceMaps, emitDeclarationOnly, declarationFolder, buildFolder, includeTests, workspaces, }: Partial<TypeScriptOptions>): import("@beemo/driver-typescript").CompilerOptions;
|
|
18
19
|
export declare function getConfig(options: TypeScriptOptions): TypeScriptConfig;
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -19,7 +19,9 @@ function getCompilerOptions({
|
|
|
19
19
|
skipLibCheck = false,
|
|
20
20
|
sourceMaps = true,
|
|
21
21
|
emitDeclarationOnly = false,
|
|
22
|
-
|
|
22
|
+
declarationFolder,
|
|
23
|
+
buildFolder,
|
|
24
|
+
includeTests,
|
|
23
25
|
workspaces
|
|
24
26
|
}) {
|
|
25
27
|
if (workspaces) {
|
|
@@ -27,7 +29,7 @@ function getCompilerOptions({
|
|
|
27
29
|
} // Do we need isolated modules?
|
|
28
30
|
|
|
29
31
|
|
|
30
|
-
compilerOptions.isolatedModules = future && library;
|
|
32
|
+
compilerOptions.isolatedModules = future && library && !includeTests;
|
|
31
33
|
compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
|
|
32
34
|
compilerOptions.allowJs = allowJs;
|
|
33
35
|
compilerOptions.skipLibCheck = skipLibCheck;
|
|
@@ -47,8 +49,13 @@ function getCompilerOptions({
|
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
|
|
52
|
+
if (!workspaces && library) {
|
|
53
|
+
compilerOptions.declarationDir = declarationFolder || buildFolder;
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
if (!workspaces) {
|
|
51
|
-
compilerOptions.outDir =
|
|
57
|
+
compilerOptions.outDir = buildFolder;
|
|
58
|
+
compilerOptions.rootDir = srcFolder;
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
compilerOptions.composite = library && !workspaces;
|
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","emitDeclarationOnly","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":null,"names":["config","require","compilerOptions","getCompilerOptions","library","future","react","srcFolder","allowJs","skipLibCheck","sourceMaps","emitDeclarationOnly","declarationFolder","buildFolder","includeTests","workspaces","Object","assign","isolatedModules","useDefineForClassFields","process","env","NODE_ENV","declaration","lib","jsx","baseUrl","paths","ALIAS_PATTERN","declarationDir","outDir","rootDir","composite","sourceMap","declarationMap","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,EA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
|
+
"version": "5.1.12-alpha.9+b8554e43",
|
|
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.12-alpha.
|
|
32
|
-
"tsconfig-oriflame": "^5.1.12-alpha.
|
|
31
|
+
"@oriflame/lumos-common": "^5.1.12-alpha.9+b8554e43",
|
|
32
|
+
"tsconfig-oriflame": "^5.1.12-alpha.9+b8554e43"
|
|
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": "b8554e4356457b153bdf45baf63ecefc63260d95"
|
|
49
49
|
}
|
package/src/index.ts
CHANGED
|
@@ -16,7 +16,8 @@ export interface TypeScriptOptions {
|
|
|
16
16
|
allowJs?: boolean;
|
|
17
17
|
includeTests?: boolean;
|
|
18
18
|
testsFolder: string;
|
|
19
|
-
|
|
19
|
+
buildFolder: string;
|
|
20
|
+
declarationFolder?: string;
|
|
20
21
|
emitDeclarationOnly?: boolean;
|
|
21
22
|
skipLibCheck?: boolean;
|
|
22
23
|
}
|
|
@@ -30,7 +31,9 @@ export function getCompilerOptions({
|
|
|
30
31
|
skipLibCheck = false,
|
|
31
32
|
sourceMaps = true,
|
|
32
33
|
emitDeclarationOnly = false,
|
|
33
|
-
|
|
34
|
+
declarationFolder,
|
|
35
|
+
buildFolder,
|
|
36
|
+
includeTests,
|
|
34
37
|
workspaces,
|
|
35
38
|
}: Partial<TypeScriptOptions>) {
|
|
36
39
|
if (workspaces) {
|
|
@@ -40,7 +43,7 @@ export function getCompilerOptions({
|
|
|
40
43
|
);
|
|
41
44
|
}
|
|
42
45
|
// Do we need isolated modules?
|
|
43
|
-
compilerOptions.isolatedModules = future && library;
|
|
46
|
+
compilerOptions.isolatedModules = future && library && !includeTests;
|
|
44
47
|
compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
|
|
45
48
|
compilerOptions.allowJs = allowJs;
|
|
46
49
|
compilerOptions.skipLibCheck = skipLibCheck;
|
|
@@ -58,8 +61,13 @@ export function getCompilerOptions({
|
|
|
58
61
|
};
|
|
59
62
|
}
|
|
60
63
|
|
|
64
|
+
if (!workspaces && library) {
|
|
65
|
+
compilerOptions.declarationDir = declarationFolder || buildFolder;
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
if (!workspaces) {
|
|
62
|
-
compilerOptions.outDir =
|
|
69
|
+
compilerOptions.outDir = buildFolder;
|
|
70
|
+
compilerOptions.rootDir = srcFolder;
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
compilerOptions.composite = library && !workspaces;
|