File tree 1 file changed +6
-1
lines changed 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,18 @@ const copyFiles = args.includes('--no-copy-files') ? [] : ['--copy-files']
42
42
const useSpecifiedOutDir = args . includes ( '--out-dir' )
43
43
const builtInOutDir = 'dist'
44
44
const outDir = useSpecifiedOutDir ? [ ] : [ '--out-dir' , builtInOutDir ]
45
+ const noTypeDefinitions = args . includes ( '--no-ts-defs' )
45
46
46
47
if ( ! useSpecifiedOutDir && ! args . includes ( '--no-clean' ) ) {
47
48
rimraf . sync ( fromRoot ( 'dist' ) )
48
49
} else {
49
50
args = args . filter ( a => a !== '--no-clean' )
50
51
}
51
52
53
+ if ( noTypeDefinitions ) {
54
+ args = args . filter ( a => a !== '--no-ts-defs' )
55
+ }
56
+
52
57
function go ( ) {
53
58
let result = spawn . sync (
54
59
resolveBin ( '@babel/cli' , { executable : 'babel' } ) ,
@@ -66,7 +71,7 @@ function go() {
66
71
67
72
const pathToOutDir = fromRoot ( parsedArgs . outDir || builtInOutDir )
68
73
69
- if ( hasTypescript && ! args . includes ( '--no-ts-defs' ) ) {
74
+ if ( hasTypescript && ! noTypeDefinitions ) {
70
75
console . log ( 'Generating TypeScript definitions' )
71
76
result = generateTypeDefs ( pathToOutDir )
72
77
console . log ( 'TypeScript definitions generated' )
You can’t perform that action at this time.
0 commit comments