@@ -49,7 +49,7 @@ const entrypoints = [
49
49
'dist/packages-dist/forms/index.d.ts' ,
50
50
'dist/packages-dist/router/index.d.ts'
51
51
] ;
52
- const publicApiDir = 'tools/public_api_guard' ;
52
+ const publicApiDir = path . normalize ( 'tools/public_api_guard' ) ;
53
53
const publicApiArgs = [
54
54
'--rootDir' , 'dist/packages-dist' ,
55
55
'--stripExportPattern' , '^__' ,
@@ -64,7 +64,7 @@ gulp.task('public-api:enforce', (done) => {
64
64
const child_process = require ( 'child_process' ) ;
65
65
child_process
66
66
. spawn (
67
- ` ${ __dirname } /node_modules/.bin/ts-api-guardian` ,
67
+ path . join ( __dirname , ` /node_modules/.bin/ts-api-guardian${ / ^ w i n / . test ( os . platform ( ) ) ? '.cmd' : '' } ` ) ,
68
68
[ '--verifyDir' , publicApiDir ] . concat ( publicApiArgs ) , { stdio : 'inherit' } )
69
69
. on ( 'close' , ( errorCode ) => {
70
70
if ( errorCode !== 0 ) {
@@ -80,7 +80,7 @@ gulp.task('public-api:update', (done) => {
80
80
const child_process = require ( 'child_process' ) ;
81
81
child_process
82
82
. spawn (
83
- ` ${ __dirname } /node_modules/.bin/ts-api-guardian` ,
83
+ path . join ( __dirname , ` /node_modules/.bin/ts-api-guardian${ / ^ w i n / . test ( os . platform ( ) ) ? '.cmd' : '' } ` ) ,
84
84
[ '--outDir' , publicApiDir ] . concat ( publicApiArgs ) , { stdio : 'inherit' } )
85
85
. on ( 'close' , ( errorCode ) => done ( errorCode ) ) ;
86
86
} ) ;
0 commit comments