public Startup(IConfiguration configuration, IHostEnvironment env) { Configuration = configuration; #if DEBUG var root = env.ContentRootPath; ContentRootPath = Path.Combine(root, "ClientApp"); if (Directory.Exists(ContentRootPath)) { CommandLineTool.Run("npm run dev", ContentRootPath); } #endif }
public Startup(IConfiguration configuration, IHostEnvironment env) { Configuration = configuration; var root = env.ContentRootPath; ContentRootPath = Path.Combine(root, "ClientApp"); CommandLineTool.Run("set BROWSER=none&&npm start", ContentRootPath, output => { if (output.Contains("localhost:3000")) { CommandLineTool.Run("electron .", ContentRootPath); } }); }
public Startup(IConfiguration configuration, IHostEnvironment env) { Configuration = configuration; #if DEBUG var root = env.ContentRootPath; ContentRootPath = Path.Combine(root, "ClientApp"); if (Directory.Exists(ContentRootPath)) { CommandLineTool.Run("npm start", ContentRootPath, output => { if (output.Contains("development server")) { CommandLineTool.Run("npm run start-electron", ContentRootPath); } }); } #endif }