コード例 #1
0
        void CompileFiles(TypeScriptProject project, FileName[] fileNames)
        {
            ReportCompileStarting(project);

            var compiler = new TypeScriptCompiler();
            compiler.AddFiles(fileNames);

            Report(compiler.GetCommandLine());

            TypeScriptCompilerResult result = compiler.Compile();
            UpdateProject(project, result.GeneratedFiles);

            ReportCompileFinished(result.HasErrors);
        }
コード例 #2
0
        public void Compile(FileName fileName)
        {
            ReportCompileStarting(fileName);

            var compiler = new TypeScriptCompiler();
            compiler.AddFiles(fileName);

            Report(compiler.GetCommandLine());

            TypeScriptCompilerResult result = compiler.Compile();

            TypeScriptProject project = TypeScriptService.GetProjectForFile(fileName);
            if (project != null) {
                UpdateProject(project, result.GeneratedFiles);
            }

            ReportCompileFinished(result.HasErrors);
        }