@oriflame/config-typescript 5.10.1 → 5.10.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/lib/index.js +3 -92
- package/lib/index.js.map +1 -1
- package/lib/index2.js +100 -0
- package/lib/index2.js.map +1 -0
- package/package.json +4 -4
package/lib/index.js
CHANGED
@@ -4,97 +4,8 @@ Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
|
7
|
-
const
|
7
|
+
const index = require('./index2.js');
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
const compilerOptions = config.compilerOptions;
|
12
|
-
|
13
|
-
function getCompilerOptions({
|
14
|
-
library = false,
|
15
|
-
future = false,
|
16
|
-
react = false,
|
17
|
-
srcFolder = 'src',
|
18
|
-
allowJs = false,
|
19
|
-
skipLibCheck = false,
|
20
|
-
sourceMaps = true,
|
21
|
-
declarationOnly = false,
|
22
|
-
declarationFolder,
|
23
|
-
buildFolder,
|
24
|
-
includeTests,
|
25
|
-
workspaces
|
26
|
-
}) {
|
27
|
-
if (workspaces) {
|
28
|
-
Object.assign(compilerOptions, require('tsconfig-oriflame/tsconfig.workspaces.json').compilerOptions);
|
29
|
-
} // Do we need isolated modules?
|
30
|
-
|
31
|
-
|
32
|
-
compilerOptions.isolatedModules = future && library && !includeTests;
|
33
|
-
compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
|
34
|
-
compilerOptions.allowJs = allowJs;
|
35
|
-
compilerOptions.skipLibCheck = skipLibCheck;
|
36
|
-
|
37
|
-
if (react) {
|
38
|
-
compilerOptions.lib = [...(compilerOptions.lib ?? []), 'dom.iterable'];
|
39
|
-
compilerOptions.jsx = 'react-jsx';
|
40
|
-
}
|
41
|
-
|
42
|
-
if (!library) {
|
43
|
-
compilerOptions.baseUrl = '.';
|
44
|
-
compilerOptions.paths = {
|
45
|
-
[`${lumosCommon.ALIAS_PATTERN}/*`]: [`./${srcFolder}/*`]
|
46
|
-
};
|
47
|
-
}
|
48
|
-
|
49
|
-
if (!workspaces && library) {
|
50
|
-
compilerOptions.declarationDir = declarationFolder || buildFolder;
|
51
|
-
}
|
52
|
-
|
53
|
-
if (!workspaces) {
|
54
|
-
if (!includeTests) {
|
55
|
-
compilerOptions.rootDir = srcFolder;
|
56
|
-
compilerOptions.emitDeclarationOnly = declarationOnly;
|
57
|
-
compilerOptions.declaration = library || declarationOnly;
|
58
|
-
compilerOptions.declarationMap = library || declarationOnly;
|
59
|
-
compilerOptions.outDir = buildFolder;
|
60
|
-
}
|
61
|
-
|
62
|
-
compilerOptions.composite = library;
|
63
|
-
}
|
64
|
-
|
65
|
-
if (sourceMaps) {
|
66
|
-
compilerOptions.sourceMap = true;
|
67
|
-
}
|
68
|
-
|
69
|
-
return compilerOptions;
|
70
|
-
}
|
71
|
-
|
72
|
-
function getConfig(options) {
|
73
|
-
const workspaces = options.workspaces,
|
74
|
-
srcFolder = options.srcFolder,
|
75
|
-
typesFolder = options.typesFolder,
|
76
|
-
includeTests = options.includeTests,
|
77
|
-
testsFolder = options.testsFolder;
|
78
|
-
|
79
|
-
if (workspaces) {
|
80
|
-
return {
|
81
|
-
compilerOptions: getCompilerOptions(options)
|
82
|
-
};
|
83
|
-
}
|
84
|
-
|
85
|
-
const tsconfig = {
|
86
|
-
compilerOptions: getCompilerOptions(options),
|
87
|
-
include: [`./${srcFolder}/**/*`, `./${typesFolder}/**/*`],
|
88
|
-
exclude: ['**/node_modules/*']
|
89
|
-
};
|
90
|
-
|
91
|
-
if (includeTests) {
|
92
|
-
tsconfig.include.push(`./${testsFolder}/**/*`);
|
93
|
-
}
|
94
|
-
|
95
|
-
return tsconfig;
|
96
|
-
}
|
97
|
-
|
98
|
-
exports.getCompilerOptions = getCompilerOptions;
|
99
|
-
exports.getConfig = getConfig;
|
9
|
+
exports.getCompilerOptions = index.getCompilerOptions;
|
10
|
+
exports.getConfig = index.getConfig;
|
100
11
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":null,"names":[],"mappings":";;;;;;;;;"}
|
package/lib/index2.js
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
const lumosCommon = require('@oriflame/lumos-common');
|
8
|
+
|
9
|
+
const config = require('tsconfig-oriflame/tsconfig.json');
|
10
|
+
|
11
|
+
const compilerOptions = config.compilerOptions;
|
12
|
+
|
13
|
+
function getCompilerOptions({
|
14
|
+
library = false,
|
15
|
+
future = false,
|
16
|
+
react = false,
|
17
|
+
srcFolder = 'src',
|
18
|
+
allowJs = false,
|
19
|
+
skipLibCheck = false,
|
20
|
+
sourceMaps = true,
|
21
|
+
declarationOnly = false,
|
22
|
+
declarationFolder,
|
23
|
+
buildFolder,
|
24
|
+
includeTests,
|
25
|
+
workspaces
|
26
|
+
}) {
|
27
|
+
if (workspaces) {
|
28
|
+
Object.assign(compilerOptions, require('tsconfig-oriflame/tsconfig.workspaces.json').compilerOptions);
|
29
|
+
} // Do we need isolated modules?
|
30
|
+
|
31
|
+
|
32
|
+
compilerOptions.isolatedModules = future && library && !includeTests;
|
33
|
+
compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
|
34
|
+
compilerOptions.allowJs = allowJs;
|
35
|
+
compilerOptions.skipLibCheck = skipLibCheck;
|
36
|
+
|
37
|
+
if (react) {
|
38
|
+
compilerOptions.lib = [...(compilerOptions.lib ?? []), 'dom.iterable'];
|
39
|
+
compilerOptions.jsx = 'react-jsx';
|
40
|
+
}
|
41
|
+
|
42
|
+
if (!library) {
|
43
|
+
compilerOptions.baseUrl = '.';
|
44
|
+
compilerOptions.paths = {
|
45
|
+
[`${lumosCommon.ALIAS_PATTERN}/*`]: [`./${srcFolder}/*`]
|
46
|
+
};
|
47
|
+
}
|
48
|
+
|
49
|
+
if (!workspaces && library) {
|
50
|
+
compilerOptions.declarationDir = declarationFolder || buildFolder;
|
51
|
+
}
|
52
|
+
|
53
|
+
if (!workspaces) {
|
54
|
+
if (!includeTests) {
|
55
|
+
compilerOptions.rootDir = srcFolder;
|
56
|
+
compilerOptions.emitDeclarationOnly = declarationOnly;
|
57
|
+
compilerOptions.declaration = library || declarationOnly;
|
58
|
+
compilerOptions.declarationMap = library || declarationOnly;
|
59
|
+
compilerOptions.outDir = buildFolder;
|
60
|
+
}
|
61
|
+
|
62
|
+
compilerOptions.composite = library;
|
63
|
+
}
|
64
|
+
|
65
|
+
if (sourceMaps) {
|
66
|
+
compilerOptions.sourceMap = true;
|
67
|
+
}
|
68
|
+
|
69
|
+
return compilerOptions;
|
70
|
+
}
|
71
|
+
|
72
|
+
function getConfig(options) {
|
73
|
+
const workspaces = options.workspaces,
|
74
|
+
srcFolder = options.srcFolder,
|
75
|
+
typesFolder = options.typesFolder,
|
76
|
+
includeTests = options.includeTests,
|
77
|
+
testsFolder = options.testsFolder;
|
78
|
+
|
79
|
+
if (workspaces) {
|
80
|
+
return {
|
81
|
+
compilerOptions: getCompilerOptions(options)
|
82
|
+
};
|
83
|
+
}
|
84
|
+
|
85
|
+
const tsconfig = {
|
86
|
+
compilerOptions: getCompilerOptions(options),
|
87
|
+
include: [`./${srcFolder}/**/*`, `./${typesFolder}/**/*`],
|
88
|
+
exclude: ['**/node_modules/*']
|
89
|
+
};
|
90
|
+
|
91
|
+
if (includeTests) {
|
92
|
+
tsconfig.include.push(`./${testsFolder}/**/*`);
|
93
|
+
}
|
94
|
+
|
95
|
+
return tsconfig;
|
96
|
+
}
|
97
|
+
|
98
|
+
exports.getCompilerOptions = getCompilerOptions;
|
99
|
+
exports.getConfig = getConfig;
|
100
|
+
//# sourceMappingURL=index2.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index2.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,CAAA;;AAEA,MAAMC,eAAe,GAAGF,MAAM,CAACE,eAA/B,CAAA;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;EASjCC,iBATiC;EAUjCC,WAViC;EAWjCC,YAXiC;AAYjCC,EAAAA,UAAAA;AAZiC,CAA5B,EAawB;AAC7B,EAAA,IAAIA,UAAJ,EAAgB;IACdC,MAAM,CAACC,MAAP,CACEf,eADF,EAEGD,OAAO,CAAC,4CAAD,CAAR,CAA4EC,eAF9E,CAAA,CAAA;AAID,GAN4B;;;EAQ7BA,eAAe,CAACgB,eAAhB,GAAkCb,MAAM,IAAID,OAAV,IAAqB,CAACU,YAAxD,CAAA;EACAZ,eAAe,CAACiB,uBAAhB,GAA0Cd,MAAM,IAAIe,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAA7E,CAAA;EACApB,eAAe,CAACM,OAAhB,GAA0BA,OAA1B,CAAA;EACAN,eAAe,CAACO,YAAhB,GAA+BA,YAA/B,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AM;IAAEtB,UAAF;IAAcR,SAAd;IAAyB+B,WAAzB;IAAsCxB,YAAtC;AAAoDyB,IAAAA,WAAAA;AAApD,GAAA,GAAoEF,OAA1E,CAAA;;AACA,EAAA,IAAItB,UAAJ,EAAgB;IACd,OAAO;MACLb,eAAe,EAAEC,kBAAkB,CAACkC,OAAD,CAAA;KADrC,CAAA;AAGD,GAAA;;AAED,EAAA,MAAMG,QAAQ,GAAG;AACftC,IAAAA,eAAe,EAAEC,kBAAkB,CAACkC,OAAD,CADpB;IAEfI,OAAO,EAAE,CAAE,CAAIlC,EAAAA,EAAAA,SAAU,OAAhB,EAAyB,CAAA,EAAA,EAAI+B,WAAY,CAAA,KAAA,CAAzC,CAFM;IAGfI,OAAO,EAAE,CAAC,mBAAD,CAAA;GAHX,CAAA;;AAMA,EAAA,IAAI5B,YAAJ,EAAkB;AAChB0B,IAAAA,QAAQ,CAACC,OAAT,CAAiBE,IAAjB,CAAuB,CAAA,EAAA,EAAIJ,WAAY,CAAvC,KAAA,CAAA,CAAA,CAAA;AACD,GAAA;;AAED,EAAA,OAAOC,QAAP,CAAA;AACD;;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@oriflame/config-typescript",
|
3
|
-
"version": "5.10.
|
3
|
+
"version": "5.10.4",
|
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.10.
|
32
|
-
"tsconfig-oriflame": "^5.10.
|
31
|
+
"@oriflame/lumos-common": "^5.10.4",
|
32
|
+
"tsconfig-oriflame": "^5.10.4"
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
35
35
|
"@beemo/core": "^2.1.4",
|
@@ -45,5 +45,5 @@
|
|
45
45
|
"format": "lib",
|
46
46
|
"platform": "node"
|
47
47
|
},
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "9c31e499d6ed5e4506f702fa468b1711dc6bfcea"
|
49
49
|
}
|