@naturalcycles/dev-lib 15.16.0 → 15.17.0
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/dist/bin/dev-lib.js +9 -12
- package/dist/build.util.d.ts +1 -1
- package/dist/build.util.js +8 -2
- package/package.json +1 -1
package/dist/bin/dev-lib.js
CHANGED
|
@@ -12,31 +12,28 @@ const test_util_1 = require("../test.util");
|
|
|
12
12
|
const yarn_util_1 = require("../yarn.util");
|
|
13
13
|
const commands = [
|
|
14
14
|
new prompts_1.Separator(), // build
|
|
15
|
+
{
|
|
16
|
+
name: 'tsc',
|
|
17
|
+
fn: tscAll,
|
|
18
|
+
desc: 'Run tsc in folders (src, scripts, e2e, playwright) if there is tsconfig.json present',
|
|
19
|
+
},
|
|
20
|
+
{ name: 'bt', fn: bt, desc: 'Build & Test: run "tsc" and then "test".' },
|
|
21
|
+
{ name: 'lbt', fn: lbt, desc: 'Lint/Build/Test: run "lint", then "tsc", then "test".' },
|
|
15
22
|
{
|
|
16
23
|
name: 'build',
|
|
17
24
|
fn: build_util_1.buildProd,
|
|
18
|
-
desc: 'Clean ./dist, run "build-copy" then tsc with emit, using tsconfig.prod.json',
|
|
19
|
-
cliOnly: true,
|
|
25
|
+
desc: 'Clean ./dist, run "build-copy" then tsc with --emit and --noCheck, using tsconfig.prod.json',
|
|
20
26
|
},
|
|
21
27
|
{
|
|
22
28
|
name: 'build-copy',
|
|
23
29
|
fn: build_util_1.buildCopy,
|
|
24
30
|
desc: 'Copy the non-ts files from ./src to ./dist',
|
|
25
|
-
cliOnly: true,
|
|
26
31
|
},
|
|
27
32
|
{
|
|
28
33
|
name: 'build-esm-cjs',
|
|
29
34
|
fn: build_util_1.buildEsmCjs,
|
|
30
|
-
desc: 'Clean ./dist and ./dist-esm, then run "tsc" in CJS and ESM modes
|
|
31
|
-
cliOnly: true,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'tsc',
|
|
35
|
-
fn: tscAll,
|
|
36
|
-
desc: 'Run tsc in folders (src, scripts, e2e, playwright) if there is tsconfig.json present',
|
|
35
|
+
desc: 'Clean ./dist and ./dist-esm, then run "tsc" in CJS and ESM modes, with --emit and --noCheck',
|
|
37
36
|
},
|
|
38
|
-
{ name: 'bt', fn: bt, desc: 'Build & Test: run "build" and then "test".' },
|
|
39
|
-
{ name: 'lbt', fn: lbt, desc: 'Lint/Build/Test: run "lint", then "build", then "test".' },
|
|
40
37
|
new prompts_1.Separator(), // test
|
|
41
38
|
{ name: 'test', fn: test_util_1.runJest, desc: 'Run jest for *.test.ts files.' },
|
|
42
39
|
{
|
package/dist/build.util.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export declare function runTSCInFolders(tsconfigPaths: string[], args?: string[]
|
|
|
8
8
|
* Pass '.' to run in root.
|
|
9
9
|
*/
|
|
10
10
|
export declare function runTSCInFolder(tsconfigPath: string, args?: string[]): Promise<void>;
|
|
11
|
-
export declare function runTSCProd(): Promise<void>;
|
|
11
|
+
export declare function runTSCProd(args?: string[]): Promise<void>;
|
|
12
12
|
export declare function buildCopy(): void;
|
package/dist/build.util.js
CHANGED
|
@@ -33,6 +33,9 @@ async function buildEsmCjs() {
|
|
|
33
33
|
'nodenext',
|
|
34
34
|
'--moduleResolution',
|
|
35
35
|
'nodenext',
|
|
36
|
+
'--noEmit',
|
|
37
|
+
'false',
|
|
38
|
+
'--noCheck',
|
|
36
39
|
],
|
|
37
40
|
shell: false,
|
|
38
41
|
}),
|
|
@@ -48,6 +51,9 @@ async function buildEsmCjs() {
|
|
|
48
51
|
'bundler',
|
|
49
52
|
'--declaration',
|
|
50
53
|
'false',
|
|
54
|
+
'--noEmit',
|
|
55
|
+
'false',
|
|
56
|
+
'--noCheck',
|
|
51
57
|
],
|
|
52
58
|
shell: false,
|
|
53
59
|
}),
|
|
@@ -84,10 +90,10 @@ async function runTSCInFolder(tsconfigPath, args = []) {
|
|
|
84
90
|
shell: false,
|
|
85
91
|
});
|
|
86
92
|
}
|
|
87
|
-
async function runTSCProd() {
|
|
93
|
+
async function runTSCProd(args = []) {
|
|
88
94
|
const tsconfigPath = [`./tsconfig.prod.json`].find(p => node_fs_1.default.existsSync(p)) || 'tsconfig.json';
|
|
89
95
|
await nodejs_lib_1.exec2.spawnAsync(`tsc`, {
|
|
90
|
-
args: ['-P', tsconfigPath],
|
|
96
|
+
args: ['-P', tsconfigPath, '--noEmit', 'false', '--noCheck', ...args],
|
|
91
97
|
shell: false,
|
|
92
98
|
});
|
|
93
99
|
}
|