using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Diagnostics;
using System.IO;

using NodeStarterTools.SolutionPaths;

namespace NodeStarterTools.BuildWorker
{
    public class DebugWorker : BaseWorker
    {
        public DebugWorker(Config Config) 
            : base(Config)
        { }

        public override void Work()
        {
            Console.WriteLine("Run SPA dev");

            ProcessStartInfo dev = new ProcessStartInfo()
            {
                FileName = Config.SPAProject.FullName + @"\dev.bat",
                WorkingDirectory = Config.SPAProject.FullName,
                CreateNoWindow = false,
                WindowStyle = ProcessWindowStyle.Normal
            };

            Process.Start(dev);//.WaitForExit();
        }
    }
}
