Пример #1
0
        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
        }
Пример #2
0
        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);
                }
            });
        }
Пример #3
0
        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
        }