File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 22'use strict' ;
33
44const tmpdir = require ( '../utilities/tmpdir' ) ;
5+ const execa = require ( 'execa' ) ;
56const fs = require ( 'fs-extra' ) ;
67const path = require ( 'path' ) ;
78const walkSync = require ( 'walk-sync' ) ;
@@ -26,13 +27,20 @@ module.exports = Command.extend({
2627
2728 // prettier-ignore
2829 let flags = [
30+ '--outDir' , outDir ,
31+ '--rootDir' , project . root ,
32+ '--allowJs' , 'false' ,
33+ '--noEmit' , 'false' ,
2934 '--declaration' ,
3035 '--sourceMap' , 'false' ,
3136 '--inlineSourceMap' , 'false' ,
3237 '--inlineSources' , 'false' ,
3338 ] ;
3439
35- return compile ( { project, outDir, flags } ) . then ( ( ) => {
40+ // Ensure the output directory is created even if no files are generated
41+ mkdirp . sync ( outDir ) ;
42+
43+ return execa ( 'tsc' , flags ) . then ( ( ) => {
3644 let output = [ ] ;
3745 for ( let declSource of walkSync ( outDir , { globs : [ '**/*.d.ts' ] } ) ) {
3846 if ( this . _shouldCopy ( declSource ) ) {
You can’t perform that action at this time.
0 commit comments