@@ -59,17 +59,6 @@ public Task<bool> ExecuteAsync()
5959 return false ;
6060 }
6161
62- string electronhosthookDir = Path . Combine ( aspCoreProjectPath , "ElectronHostHook" ) ;
63-
64- if ( Directory . Exists ( electronhosthookDir ) )
65- {
66- string hosthookDir = Path . Combine ( tempPath , "ElectronHostHook" ) ;
67- DirectoryCopy . Do ( electronhosthookDir , hosthookDir , true , new List < string > ( ) { "node_modules" } ) ;
68-
69- Console . WriteLine ( "Start npm install for hosthooks..." ) ;
70- ProcessHelper . CmdExecute ( "npm install" , hosthookDir ) ;
71- }
72-
7362 DeployEmbeddedElectronFiles . Do ( tempPath ) ;
7463
7564 var checkForNodeModulesDirPath = Path . Combine ( tempPath , "node_modules" ) ;
@@ -86,8 +75,26 @@ public Task<bool> ExecuteAsync()
8675 Console . WriteLine ( "Skip npm install, because node_modules directory exists in: " + checkForNodeModulesDirPath ) ;
8776 }
8877
78+ Console . WriteLine ( "ElectronHostHook handling started..." ) ;
79+
80+ string electronhosthookDir = Path . Combine ( Directory . GetCurrentDirectory ( ) , "ElectronHostHook" ) ;
81+
82+ if ( Directory . Exists ( electronhosthookDir ) )
83+ {
84+ string hosthookDir = Path . Combine ( tempPath , "ElectronHostHook" ) ;
85+ DirectoryCopy . Do ( electronhosthookDir , hosthookDir , true , new List < string > ( ) { "node_modules" } ) ;
86+
87+ Console . WriteLine ( "Start npm install for hosthooks..." ) ;
88+ ProcessHelper . CmdExecute ( "npm install" , hosthookDir ) ;
89+
90+ string tscPath = Path . Combine ( tempPath , "node_modules" , ".bin" ) ;
91+ // ToDo: Not sure if this runs under linux/macos
92+ ProcessHelper . CmdExecute ( @"tsc -p ../../ElectronHostHook" , tscPath ) ;
93+ }
94+
8995 string path = Path . Combine ( tempPath , "node_modules" , ".bin" ) ;
9096
97+
9198 bool isWindows = RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ;
9299 if ( isWindows )
93100 {
0 commit comments