public void Execute(string targets, int threadsNumber = DefaultThreads, string buildPath = null)
        {
            if (!PreExecutionChecks(true, true, true, true))
            {
                return;
            }
            if (buildPath == null)
            {
                buildPath = Build.DEFAULT_BUILD_PATH;
            }
            Build build = new Build(buildPath);

            using (BuildLogServices buildLogServices = new BuildLogServices(build))
            {
                BuildTargetCollection buildTargets = BuildTargetFactory.GetCollection(targets, build, buildLogServices);
                if (!buildTargets.CanBuildAndWarnIfNot())
                {
                    return;
                }
                BuildTracker buildTracker = new BuildTracker(buildTargets);
                Transpile(build, buildTracker, buildTargets, buildLogServices, threadsNumber);
                WriteTranspiled(buildTargets, buildTracker);
                ESMAnalyzer.Deallocate();//Hack - force ESM analyzer deallocation.
                PrepareWorkspace(buildTargets);
                Compile(build, buildTargets);
            }
            Console.WriteLine("Build Complete");
        }
        public void Execute(string scriptName, string targets = BuildTarget.DEFAULT_TARGETS, string buildPath = null)
        {
            if (!PreExecutionChecks(true, true, true, true))
            {
                return;
            }
            if (buildPath == null)
            {
                buildPath = Build.DEFAULT_BUILD_PATH;
            }
            Build build = new Build(buildPath);

            using (BuildLogServices buildLogServices = new BuildLogServices(build))
            {
                BuildTargetCollection buildTargets = BuildTargetFactory.GetCollection(targets, build, buildLogServices);
                if (!buildTargets.CanBuildAndWarnIfNot())
                {
                    return;
                }
                TranspileScriptJob transpileJob = new TranspileScriptJob(buildTargets, scriptName);
#if !DEBUG
                try
                {
#endif
                transpileJob.Run();
#if !DEBUG
            }
            catch (ConversionException ex)
            {
                Console.WriteLine("Exception occured." + Environment.NewLine + ex.GetType().FullName + ":  " + ex.Message);
                return;
            }
#endif
                PrepareWorkspace(buildTargets);
                Compile(build, buildTargets);
            }
            Console.WriteLine("Build Complete");
            string compileLog = File.ReadAllText(build.GetCompileStandardOutputPath());
            Console.WriteLine(compileLog);
        }