Ejemplo n.º 1
0
        private static void InitiateExecutors()
        {
            var compiler = WebEditor.Host.ExportProvider.GetExport <ProjectCompiler>();

            Task.Run(async() =>
            {
                Parallel.ForEach(
                    Mef.GetSupportedContentTypes <ICompilerRunnerProvider>()
                    .Where(c => WESettings.Instance.ForContentType <ICompilerInvocationSettings>(c).CompileOnBuild),
                    c => compiler.Value.CompileSolutionAsync(c).DoNotWait("compiling solution-wide " + c.DisplayName)
                    );

                await BuildMenu.UpdateBundleFiles();
            }).DoNotWait("running solution-wide compilers");

            if (WESettings.Instance.JavaScript.LintOnBuild)
            {
                LintFileInvoker.RunOnAllFilesInProjectAsync(new[] { "*.js" }, f => new JavaScriptLintReporter(new JsHintCompiler(), f))
                .DoNotWait("running solution-wide JSHint");
                LintFileInvoker.RunOnAllFilesInProjectAsync(new[] { "*.js" }, f => new JavaScriptLintReporter(new JsCodeStyleCompiler(), f))
                .DoNotWait("running solution-wide JSCS");
            }

            if (WESettings.Instance.TypeScript.LintOnBuild)
            {
                LintFileInvoker.RunOnAllFilesInProjectAsync(new[] { "*.ts" }, f => new LintReporter(new TsLintCompiler(), WESettings.Instance.TypeScript, f))
                .DoNotWait("running solution-wide TSLint");
            }

            if (WESettings.Instance.CoffeeScript.LintOnBuild)
            {
                LintFileInvoker.RunOnAllFilesInProjectAsync(new[] { "*.coffee", "*.iced" }, f => new LintReporter(new CoffeeLintCompiler(), WESettings.Instance.CoffeeScript, f))
                .DoNotWait("running solution-wide CoffeeLint");
            }

            BundleFilesMenu.UpdateAllBundlesAsync(true).DoNotWait("running bundles");
            SpriteImageMenu.UpdateAllSpritesAsync(true).DoNotWait("running sprites");
        }
Ejemplo n.º 2
0
 private static void RunBundles()
 {
     BundleFilesMenu.UpdateAllBundlesAsync(true).DoNotWait("Web Essentials: Updating Bundles...");
     SpriteImageMenu.UpdateAllSpritesAsync(true).DoNotWait("Web Essentials: Updating Sprites...");
 }
Ejemplo n.º 3
0
 private async static Task UpdateBundleFiles()
 {
     await BundleFilesMenu.UpdateAllBundlesAsync();
 }