@@ -10,23 +10,16 @@ import * as ncc from "@zeit/ncc";
1010
1111const basePath : fs . PathLike = fs . realpathSync ( path . resolve ( __dirname , "../.." ) ) ;
1212
13- interface INCCCompileOptions {
14- cache ?: boolean ;
15- debugLog ?: boolean ;
16- externals ?: string [ ] ;
17- filterAssetBase ?: string ;
18- minify ?: boolean ;
19- quiet ?: boolean ;
20- v8cache ?: boolean ;
21- }
22-
23- function nccCompile ( options ?: INCCCompileOptions ) : any {
13+ function nccCompile ( ) : any {
2414 return through . obj ( ( chunk : any , encoding : string , callback : through . TransformCallback ) : any => {
2515 if ( chunk . isBuffer ( ) ) {
26- ncc ( chunk . path , Object . assign ( options , {
16+ ncc ( chunk . path , {
17+ cache : false ,
18+ minify : false ,
19+ quiet : false ,
2720 sourceMap : false ,
2821 sourceMapRegister : false ,
29- } ) ) . then ( ( result : any ) : void => {
22+ } ) . then ( ( result : any ) : void => {
3023 chunk . path = chunk . path . replace ( ".ts" , ".js" ) ;
3124 chunk . contents = Buffer . from ( result . code ) ;
3225 callback ( undefined , chunk ) ;
@@ -38,11 +31,7 @@ function nccCompile(options?: INCCCompileOptions): any {
3831}
3932
4033gulp . task ( "default" , ( ) : NodeJS . ReadWriteStream => {
41- return gulp . src ( path . join ( basePath , ".github/actions/**/*.ts" ) )
42- . pipe ( nccCompile ( {
43- cache : false ,
44- minify : false ,
45- quiet : false ,
46- } ) )
34+ return gulp . src ( path . join ( basePath , ".github/actions/**/index.ts" ) )
35+ . pipe ( nccCompile ( ) )
4736 . pipe ( gulp . dest ( path . resolve ( basePath , ".github/actions/" ) ) ) ;
4837} ) ;
0 commit comments