├── UpgradeLog.htm ├── art ├── debug.png ├── bindings.png ├── console.png ├── open-trx.png ├── task-list.png ├── watermark.png └── item-template.png ├── src ├── Resources │ ├── icon.png │ ├── logo.png │ └── preview.png ├── source.extension.ico ├── ItemTemplates │ └── Brunch │ │ ├── icon.png │ │ ├── preview.png │ │ ├── _preprocess.xml │ │ ├── brunch-config.coffee │ │ └── _Definitions │ │ ├── CSharp.vstemplate │ │ └── Web.csharp.vstemplate ├── Adornments │ ├── AdornmentLayer.cs │ ├── AdornmentProvider.cs │ └── LogoAdornment.cs ├── registry.pkgdef ├── Properties │ ├── AssemblyInfo.cs │ └── template-builder.props ├── TaskRunner │ ├── TaskRunnerOption.cs │ ├── TaskRunnerConfig.cs │ └── TaskRunner.cs ├── source.extension.cs ├── VsCommandTable.cs ├── VsCommandTable.vsct ├── source.extension.vsixmanifest ├── BrunchPackage.cs ├── packages.config ├── Helpers │ └── ProjectHelpers.cs ├── source.extension.resx └── BrunchTaskRunner.csproj ├── .editorconfig ├── .gitignore ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE.md └── CONTRIBUTING.md ├── LICENSE ├── appveyor.yml ├── BrunchTaskRunner.sln ├── Backup └── BrunchTaskRunner.sln └── README.md /UpgradeLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/UpgradeLog.htm -------------------------------------------------------------------------------- /art/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/art/debug.png -------------------------------------------------------------------------------- /art/bindings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/art/bindings.png -------------------------------------------------------------------------------- /art/console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/art/console.png -------------------------------------------------------------------------------- /art/open-trx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/art/open-trx.png -------------------------------------------------------------------------------- /art/task-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/art/task-list.png -------------------------------------------------------------------------------- /art/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/art/watermark.png -------------------------------------------------------------------------------- /art/item-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/art/item-template.png -------------------------------------------------------------------------------- /src/Resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/src/Resources/icon.png -------------------------------------------------------------------------------- /src/Resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/src/Resources/logo.png -------------------------------------------------------------------------------- /src/source.extension.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/src/source.extension.ico -------------------------------------------------------------------------------- /src/Resources/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/src/Resources/preview.png -------------------------------------------------------------------------------- /src/ItemTemplates/Brunch/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/src/ItemTemplates/Brunch/icon.png -------------------------------------------------------------------------------- /src/ItemTemplates/Brunch/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/BrunchTaskRunner/master/src/ItemTemplates/Brunch/preview.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Top-most EditorConfig file 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | end_of_line = crlf 7 | indent_size = 4 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | packages 2 | node_modules.7z 3 | template-report.xml 4 | 5 | # User files 6 | *.suo 7 | *.user 8 | *.sln.docstates 9 | .vs/ 10 | 11 | # Build results 12 | 13 | [Dd]ebug/ 14 | [Rr]elease/ 15 | x64/ 16 | [Bb]in/ 17 | [Oo]bj/ 18 | 19 | # MSTest test Results 20 | [Tt]est[Rr]esult*/ 21 | [Bb]uild[Ll]og.* 22 | 23 | # NCrunch 24 | *.ncrunchsolution 25 | *.ncrunchproject 26 | _NCrunch_WebCompiler -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /src/ItemTemplates/Brunch/_preprocess.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Installed product versions 2 | - Visual Studio: [example 2015 Professional] 3 | - This extension: [example 1.1.21] 4 | 5 | ### Description 6 | Replace this text with a short description 7 | 8 | ### Steps to recreate 9 | 1. Replace this 10 | 2. text with 11 | 3. the steps 12 | 4. to recreate 13 | 14 | ### Current behavior 15 | Explain what it's doing and why it's wrong 16 | 17 | ### Expected behavior 18 | Explain what it should be doing after it's fixed. -------------------------------------------------------------------------------- /src/ItemTemplates/Brunch/brunch-config.coffee: -------------------------------------------------------------------------------- 1 | exports.config = 2 | # See http://brunch.io/ for documentation. 3 | paths: 4 | public: 'wwwroot' 5 | files: 6 | javascripts: 7 | joinTo: 8 | 'js/app.js' : /^app/ 9 | 'js/libs.js': /(vendor|bower_components)/ 10 | stylesheets: 11 | joinTo: 12 | '/css/app.css' : /^app/ 13 | '/css/libs.css' : /(vendor|bower_components)/ 14 | modules: 15 | wrapper: false 16 | definition: false 17 | -------------------------------------------------------------------------------- /src/Adornments/AdornmentLayer.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using Microsoft.VisualStudio.Text.Editor; 3 | using Microsoft.VisualStudio.Utilities; 4 | 5 | namespace BrunchTaskRunner 6 | { 7 | class AdornmentLayer 8 | { 9 | public const string LayerName = Vsix.Name + " Logo"; 10 | 11 | [Export(typeof(AdornmentLayerDefinition))] 12 | [Name(LayerName)] 13 | [Order(Before = PredefinedAdornmentLayers.Caret)] 14 | public AdornmentLayerDefinition editorAdornmentLayer = null; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/registry.pkgdef: -------------------------------------------------------------------------------- 1 | // Nesting 2 | [$RootKey$\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.coffee] 3 | "RelationType"=dword:00000001 4 | 5 | [$RootKey$\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.coffee\.coffee.bindings] 6 | 7 | [$RootKey$\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.js] 8 | "RelationType"=dword:00000001 9 | 10 | [$RootKey$\Projects\{E24C65DC-7377-472b-9ABA-BC803B73C61A}\RelatedFiles\.js\.js.bindings] 11 | 12 | // Icons 13 | [$RootKey$\ShellFileAssociations\.bindings] 14 | "DefaultIconMoniker"="KnownMonikers.Binding" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 Mads Kristensen 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /src/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | using BrunchTaskRunner; 4 | 5 | [assembly: AssemblyTitle(Vsix.Name)] 6 | [assembly: AssemblyDescription(Vsix.Description)] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany(Vsix.Author)] 9 | [assembly: AssemblyProduct(Vsix.Name)] 10 | [assembly: AssemblyCopyright(Vsix.Author)] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture(Vsix.Language)] 13 | 14 | [assembly: ComVisible(false)] 15 | [assembly: AssemblyVersion(Vsix.Version)] 16 | [assembly: AssemblyFileVersion(Vsix.Version)] 17 | -------------------------------------------------------------------------------- /src/TaskRunner/TaskRunnerOption.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TaskRunnerExplorer; 3 | 4 | namespace BrunchTaskRunner 5 | { 6 | public class TaskRunnerOption : ITaskRunnerOption 7 | { 8 | public TaskRunnerOption(string name, uint id, Guid guid, bool isChecked, string command) 9 | { 10 | Name = name; 11 | Id = id; 12 | Guid = guid; 13 | Checked = isChecked; 14 | Command = command; 15 | } 16 | 17 | public bool Checked { get; set; } 18 | public uint Id { get; } 19 | public Guid Guid { get; } 20 | public string Name { get; } 21 | public string Command { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/source.extension.cs: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------------------ 2 | // 3 | // This file was generated by Extensibility Tools v1.10.211 4 | // 5 | // ------------------------------------------------------------------------------ 6 | namespace BrunchTaskRunner 7 | { 8 | static class Vsix 9 | { 10 | public const string Id = "b4a4ad37-5a4b-4dfd-85fd-595cab6a26a9"; 11 | public const string Name = "Brunch Task Runner"; 12 | public const string Description = @"Adds support for the Brunch build tool in Visual Studio's Task Runner Explorer."; 13 | public const string Language = "en-US"; 14 | public const string Version = "1.3"; 15 | public const string Author = "Mads Kristensen"; 16 | public const string Tags = "brunch, build"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | image: Visual Studio 2017 2 | 3 | install: 4 | - ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex 5 | 6 | before_build: 7 | - ps: Vsix-IncrementVsixVersion | Vsix-UpdateBuildVersion 8 | - ps: Vsix-TokenReplacement src\source.extension.cs 'Version = "([0-9\\.]+)"' 'Version = "{version}"' 9 | 10 | build_script: 11 | - nuget restore -Verbosity quiet 12 | - msbuild /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m 13 | 14 | after_test: 15 | - ps: Vsix-PushArtifacts | Vsix-PublishToGallery 16 | 17 | before_deploy: 18 | - ps: Vsix-CreateChocolatyPackage -packageId brunchtaskrunner 19 | 20 | deploy: 21 | - provider: Environment 22 | name: Chocolatey 23 | on: 24 | branch: master 25 | appveyor_repo_commit_message_extended: /\[release\]/ -------------------------------------------------------------------------------- /src/Properties/template-builder.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 13 | 14 | 15 | My Custom Templates 16 | 17 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/ItemTemplates/Brunch/_Definitions/CSharp.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | brunch-config.coffee 4 | Brunch Configuration file (CoffeeScript) 5 | Brunch Task Runner configuration file. 6 | CSharp 7 | icon.png 8 | preview.png 9 | 1 10 | 5d0d6b46-9f0f-4948-b3f5-7f3d4dcb3200 11 | ABC | (!ABC) 12 | 1000 13 | 14 | 15 | 16 | brunch-config.coffee 17 | 18 | -------------------------------------------------------------------------------- /src/ItemTemplates/Brunch/_Definitions/Web.csharp.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | brunch-config.coffee 4 | Brunch Configuration file (CoffeeScript) 5 | Brunch Task Runner configuration file. 6 | Web 7 | CSharp 8 | icon.png 9 | preview.png 10 | 1 11 | 5d0d6b46-9f0f-4948-b3f5-7f3d4dcb320b 12 | ABC | (!ABC) 13 | 1000 14 | 15 | 16 | 17 | brunch-config.coffee 18 | 19 | -------------------------------------------------------------------------------- /BrunchTaskRunner.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28125.3055 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrunchTaskRunner", "src\BrunchTaskRunner.csproj", "{94660BCF-169A-42E1-BD84-345449743069}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{04D0CE67-A915-44BB-BC3C-8E7885CF9E97}" 9 | ProjectSection(SolutionItems) = preProject 10 | appveyor.yml = appveyor.yml 11 | README.md = README.md 12 | EndProjectSection 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {94660BCF-169A-42E1-BD84-345449743069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {94660BCF-169A-42E1-BD84-345449743069}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {94660BCF-169A-42E1-BD84-345449743069}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {94660BCF-169A-42E1-BD84-345449743069}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Backup/BrunchTaskRunner.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrunchTaskRunner", "src\BrunchTaskRunner.csproj", "{94660BCF-169A-42E1-BD84-345449743069}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{04D0CE67-A915-44BB-BC3C-8E7885CF9E97}" 9 | ProjectSection(SolutionItems) = preProject 10 | appveyor.yml = appveyor.yml 11 | README.md = README.md 12 | EndProjectSection 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {94660BCF-169A-42E1-BD84-345449743069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {94660BCF-169A-42E1-BD84-345449743069}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {94660BCF-169A-42E1-BD84-345449743069}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {94660BCF-169A-42E1-BD84-345449743069}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /src/VsCommandTable.cs: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------------------ 2 | // 3 | // This file was generated by Extensibility Tools v1.10.184 4 | // 5 | // ------------------------------------------------------------------------------ 6 | namespace BrunchTaskRunner 7 | { 8 | using System; 9 | 10 | /// 11 | /// Helper class that exposes all GUIDs used across VS Package. 12 | /// 13 | internal sealed partial class PackageGuids 14 | { 15 | public const string guidBrunchPackageString = "4da50b2f-e51e-448a-8fa7-cdb0a5013ee9"; 16 | public const string guidBrunchPackageCmdSetString = "8a146367-3169-459c-80ed-3c012ec0e380"; 17 | public const string guidTaskRunnerExplorerCmdSetString = "9e78b319-2142-4381-873c-6ec83f092915"; 18 | public static Guid guidBrunchPackage = new Guid(guidBrunchPackageString); 19 | public static Guid guidBrunchPackageCmdSet = new Guid(guidBrunchPackageCmdSetString); 20 | public static Guid guidTaskRunnerExplorerCmdSet = new Guid(guidTaskRunnerExplorerCmdSetString); 21 | } 22 | /// 23 | /// Helper class that encapsulates all CommandIDs uses across VS Package. 24 | /// 25 | internal sealed partial class PackageIds 26 | { 27 | public const int cmdDebug = 0x0100; 28 | public const int IDG_TASKRUNNER_TOOLBAR_CUSTOM_COMMANDS = 0x2002; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/VsCommandTable.vsct: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Brunch Task Runner 6 | Adds support for the Brunch build tool in Visual Studio's Task Runner Explorer. 7 | https://github.com/madskristensen/brunchtaskrunner 8 | Resources\LICENSE 9 | Resources\icon.png 10 | Resources\preview.png 11 | brunch, build 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/BrunchPackage.cs: -------------------------------------------------------------------------------- 1 | using EnvDTE; 2 | using EnvDTE80; 3 | using Microsoft.VisualStudio.OLE.Interop; 4 | using Microsoft.VisualStudio.Shell; 5 | using Microsoft.VisualStudio.Shell.Interop; 6 | using System.Runtime.InteropServices; 7 | 8 | namespace BrunchTaskRunner 9 | { 10 | [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] 11 | [InstalledProductRegistration("#110", "#112", Vsix.Version, IconResourceID = 400)] 12 | [ProvideAutoLoad(UIContextGuids80.SolutionHasSingleProject, PackageAutoLoadFlags.BackgroundLoad)] 13 | [ProvideAutoLoad(UIContextGuids80.SolutionHasMultipleProjects, PackageAutoLoadFlags.BackgroundLoad)] 14 | [Guid(PackageGuids.guidBrunchPackageString)] 15 | [ProvideMenuResource("Menus.ctmenu", 1)] 16 | public sealed class BrunchPackage : AsyncPackage 17 | { 18 | internal static DTE2 Dte; 19 | 20 | protected override async System.Threading.Tasks.Task InitializeAsync(System.Threading.CancellationToken cancellationToken, System.IProgress progress) 21 | { 22 | await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); 23 | 24 | Dte = (DTE2)await GetServiceAsync(typeof(DTE)); 25 | } 26 | 27 | public static bool IsDocumentDirty(string documentPath, out IVsPersistDocData persistDocData) 28 | { 29 | var serviceProvider = new ServiceProvider((IServiceProvider)Dte); 30 | 31 | IVsHierarchy vsHierarchy; 32 | uint itemId, docCookie; 33 | VsShellUtilities.GetRDTDocumentInfo( 34 | serviceProvider, documentPath, out vsHierarchy, out itemId, out persistDocData, out docCookie); 35 | if (persistDocData != null) 36 | { 37 | int isDirty; 38 | persistDocData.IsDocDataDirty(out isDirty); 39 | return isDirty == 1; 40 | } 41 | 42 | return false; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/TaskRunner/TaskRunnerConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Windows.Media; 5 | using Microsoft.VisualStudio.Shell.Interop; 6 | using Microsoft.VisualStudio.TaskRunnerExplorer; 7 | 8 | namespace BrunchTaskRunner 9 | { 10 | class TaskRunnerConfig : ITaskRunnerConfig 11 | { 12 | private readonly ImageSource _icon; 13 | private readonly ITaskRunnerCommandContext _context; 14 | readonly ITaskRunnerNode _hierarchy; 15 | 16 | public TaskRunnerConfig(ITaskRunnerCommandContext context, ITaskRunnerNode hierarchy, ImageSource icon) 17 | { 18 | _context = context; 19 | _hierarchy = hierarchy; 20 | _icon = icon; 21 | } 22 | 23 | public ImageSource Icon 24 | { 25 | get { return _icon; } 26 | } 27 | 28 | public ITaskRunnerNode TaskHierarchy 29 | { 30 | get { return _hierarchy; } 31 | } 32 | 33 | public void Dispose() 34 | { 35 | // Nothing to dispose 36 | } 37 | 38 | public string LoadBindings(string configPath) 39 | { 40 | string bindingPath = configPath + ".bindings"; 41 | 42 | if (File.Exists(bindingPath)) 43 | return File.ReadAllText(bindingPath).Replace("///", string.Empty); 44 | 45 | return ""; 46 | } 47 | 48 | public bool SaveBindings(string configPath, string bindingsXml) 49 | { 50 | string bindingPath = configPath + ".bindings"; 51 | 52 | try 53 | { 54 | ProjectHelpers.CheckFileOutOfSourceControl(bindingPath); 55 | 56 | if (bindingsXml == "" && File.Exists(bindingPath)) 57 | { 58 | ProjectHelpers.DeleteFileFromProject(bindingPath); 59 | } 60 | else 61 | { 62 | File.WriteAllText(bindingPath, "///" + bindingsXml, Encoding.UTF8); 63 | ProjectHelpers.AddNestedFile(configPath, bindingPath); 64 | } 65 | 66 | if (!BrunchPackage.IsDocumentDirty(configPath, out IVsPersistDocData persistDocData) && persistDocData != null) 67 | { 68 | persistDocData.SaveDocData(VSSAVEFLAGS.VSSAVE_SilentSave, out string newName, out int cancelled); 69 | } 70 | else if (persistDocData == null) 71 | { 72 | new FileInfo(configPath).LastWriteTime = DateTime.Now; 73 | } 74 | 75 | return true; 76 | } 77 | catch (Exception ex) 78 | { 79 | System.Diagnostics.Debug.Write(ex); 80 | return false; 81 | } 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/Adornments/AdornmentProvider.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using System.IO; 3 | using Microsoft.VisualStudio.Settings; 4 | using Microsoft.VisualStudio.Shell; 5 | using Microsoft.VisualStudio.Shell.Settings; 6 | using Microsoft.VisualStudio.Text; 7 | using Microsoft.VisualStudio.Text.Editor; 8 | using Microsoft.VisualStudio.Utilities; 9 | 10 | namespace BrunchTaskRunner 11 | { 12 | [Export(typeof(IWpfTextViewCreationListener))] 13 | [ContentType("text")] 14 | [TextViewRole(PredefinedTextViewRoles.PrimaryDocument)] 15 | class AdornmentProvider : IWpfTextViewCreationListener 16 | { 17 | private const string _propertyName = "ShowWatermark"; 18 | private const double _initOpacity = 0.4D; 19 | 20 | private SettingsManager _settingsManager; 21 | private static bool _isVisible, _hasLoaded; 22 | 23 | [Import] 24 | public ITextDocumentFactoryService TextDocumentFactoryService { get; set; } 25 | 26 | [Import] 27 | public SVsServiceProvider serviceProvider { get; set; } 28 | 29 | private void LoadSettings() 30 | { 31 | if (_hasLoaded) 32 | return; 33 | 34 | _hasLoaded = true; 35 | 36 | _settingsManager = new ShellSettingsManager(serviceProvider); 37 | SettingsStore store = _settingsManager.GetReadOnlySettingsStore(SettingsScope.UserSettings); 38 | 39 | LogoAdornment.VisibilityChanged += AdornmentVisibilityChanged; 40 | 41 | _isVisible = store.GetBoolean(Vsix.Name, _propertyName, true); 42 | } 43 | 44 | private void AdornmentVisibilityChanged(object sender, bool isVisible) 45 | { 46 | WritableSettingsStore wstore = _settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings); 47 | _isVisible = isVisible; 48 | 49 | if (!wstore.CollectionExists(Vsix.Name)) 50 | wstore.CreateCollection(Vsix.Name); 51 | 52 | wstore.SetBoolean(Vsix.Name, _propertyName, isVisible); 53 | } 54 | 55 | public void TextViewCreated(IWpfTextView textView) 56 | { 57 | ITextDocument document; 58 | 59 | if (!TextDocumentFactoryService.TryGetTextDocument(textView.TextDataModel.DocumentBuffer, out document)) 60 | return; 61 | 62 | LoadSettings(); 63 | 64 | string fileName = Path.GetFileName(document.FilePath).ToLowerInvariant(); 65 | 66 | // Check if filename is absolute because when debugging, script files are sometimes dynamically created. 67 | if (string.IsNullOrEmpty(fileName) || !Path.IsPathRooted(document.FilePath)) 68 | return; 69 | 70 | if (fileName.StartsWith("brunch-config.") || fileName.Contains(".overrides.") || fileName == "config.coffee") 71 | { 72 | textView.Properties.GetOrCreateSingletonProperty(() => new LogoAdornment(textView, _isVisible, _initOpacity)); 73 | } 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Brunch Task Runner extension 2 | Adds support for the [Brunch](http://brunch.io/) 3 | build tool in Visual Studio 2015's Task Runner Explorer. 4 | 5 | [![Build status](https://ci.appveyor.com/api/projects/status/3x24c3gbyv2g34l8?svg=true)](https://ci.appveyor.com/project/madskristensen/brunchtaskrunner) 6 | 7 | Download the extension at the 8 | [VS Gallery](https://visualstudiogallery.msdn.microsoft.com/de706ad0-8a73-4df3-bef5-867bb9a70d51) 9 | or get the 10 | [nightly build](http://vsixgallery.com/extension/b4a4ad37-5a4b-4dfd-85fd-595cab6a26a9/) 11 | 12 | ## Install Brunch 13 | In order to use this extension, you must have 14 | [Brunch](http://brunch.io/) installed globally or locally 15 | in your project. 16 | 17 | Use [npm](http://npmjs.org/) to install it globally by 18 | typing the following in a command line: 19 | 20 | >npm install brunch -g 21 | 22 | ## Config files 23 | The Brunch Task Runner automatically triggers when it finds 24 | Brunch configuration files. These file names are supported: 25 | 26 | 1. config.coffee 27 | 2. brunch-config.coffee 28 | 3. brunch-config.js 29 | 30 | Any config file will have a Brunch logo watermark at 31 | the bottom right corner of the editor window. 32 | 33 | ![Watermark](art/watermark.png) 34 | 35 | You can toggle the visibility of the watermark by clicking 36 | on it. 37 | 38 | ## Task Runner Explorer 39 | Open Task Runner Explorer by right-clicking the Brunch 40 | configuration file and select **Task Runner Explorer** from 41 | the context menu: 42 | 43 | ![Open Task Runner Explorer](art/open-trx.png) 44 | 45 | Task Runner Explorer will show both _build_ and _watch_ 46 | tasks as well as any _override files_ present in the working 47 | directory. 48 | 49 | In this case, there are two *override files*: 50 | 51 | 1. config.overrides.**staging** 52 | 1. config.overrides.**test** 53 | 54 | ![Task List](art/task-list.png) 55 | 56 | Each task can be executed by double-clicking the task. 57 | 58 | ![Console output](art/console.png) 59 | 60 | ### Debugging 61 | By clicking the _Debug_ icon on the left menu bar, the 62 | **--debug** switch is being enabled for all Brunch tasks. 63 | 64 | ![Debug](art/debug.png) 65 | 66 | The _Debug_ menu icon is a toggle button that can be left 67 | on or off for as long as needed. 68 | 69 | ### Bindings 70 | Task bindings make it possible to associate individual tasks 71 | with Visual Studio events such as _Project Open_ etc. 72 | 73 | ![Bindings](art/bindings.png) 74 | 75 | ## Item Template 76 | You can easily add a new **brunch-config.coffee** file to 77 | your project from the _Add New Item_ dialog. 78 | 79 | Just search for "brunch". 80 | 81 | ![Item template](art/item-template.png) 82 | 83 | ## Contribute 84 | Check out the [contribution guidelines](.github/CONTRIBUTING.md) 85 | if you want to contribute to this project. 86 | 87 | For cloning and building this project yourself, make sure 88 | to install the 89 | [Extensibility Tools 2015](https://visualstudiogallery.msdn.microsoft.com/ab39a092-1343-46e2-b0f1-6a3f91155aa6) 90 | extension for Visual Studio which enables some features 91 | used by this project. 92 | 93 | ## License 94 | [Apache 2.0](LICENSE) -------------------------------------------------------------------------------- /src/Adornments/LogoAdornment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Reflection; 4 | using System.Windows.Controls; 5 | using System.Windows.Media; 6 | using System.Windows.Media.Imaging; 7 | using Microsoft.VisualStudio.Text.Editor; 8 | 9 | namespace BrunchTaskRunner 10 | { 11 | class LogoAdornment 12 | { 13 | private IAdornmentLayer _adornmentLayer; 14 | private Image _adornment; 15 | private readonly double _initOpacity; 16 | private double _currentOpacity; 17 | 18 | public LogoAdornment(IWpfTextView view, bool isVisible, double initOpacity) 19 | { 20 | _adornmentLayer = view.GetAdornmentLayer(AdornmentLayer.LayerName); 21 | _currentOpacity = isVisible ? initOpacity : 0; 22 | _initOpacity = initOpacity; 23 | 24 | CreateImage(); 25 | 26 | view.ViewportHeightChanged += SetAdornmentLocation; 27 | view.ViewportWidthChanged += SetAdornmentLocation; 28 | VisibilityChanged += ToggleVisibility; 29 | 30 | if (_adornmentLayer.IsEmpty) 31 | _adornmentLayer.AddAdornment(AdornmentPositioningBehavior.ViewportRelative, null, null, _adornment, null); 32 | } 33 | 34 | private void ToggleVisibility(object sender, bool isVisible) 35 | { 36 | _adornment.Opacity = isVisible ? _initOpacity : 0; 37 | _currentOpacity = _adornment.Opacity; 38 | } 39 | 40 | private void CreateImage() 41 | { 42 | _adornment = new Image(); 43 | _adornment.Source = GetImage(); 44 | _adornment.ToolTip = "Click to toggle visibility"; 45 | _adornment.Opacity = _currentOpacity; 46 | _adornment.SetValue(RenderOptions.BitmapScalingModeProperty, BitmapScalingMode.HighQuality); 47 | 48 | _adornment.MouseEnter += (s, e) => { _adornment.Opacity = 1D; }; 49 | _adornment.MouseLeave += (s, e) => { _adornment.Opacity = _currentOpacity; }; 50 | _adornment.MouseLeftButtonUp += (s, e) => { OnVisibilityChanged(_currentOpacity == 0); }; 51 | } 52 | 53 | private static ImageSource GetImage() 54 | { 55 | string assembly = Assembly.GetExecutingAssembly().Location; 56 | string folder = Path.GetDirectoryName(assembly); 57 | string file = Path.Combine(folder, "Resources\\icon.png"); 58 | 59 | Uri url = new Uri(file, UriKind.Absolute); 60 | return BitmapFrame.Create(url); 61 | } 62 | 63 | private void SetAdornmentLocation(object sender, EventArgs e) 64 | { 65 | IWpfTextView view = (IWpfTextView)sender; 66 | Canvas.SetLeft(_adornment, view.ViewportRight - _adornment.Source.Width - 20); 67 | Canvas.SetTop(_adornment, view.ViewportBottom - _adornment.Source.Height - 20); 68 | } 69 | 70 | public static event EventHandler VisibilityChanged; 71 | 72 | internal static void OnVisibilityChanged(bool isVisible) 73 | { 74 | if (VisibilityChanged != null) 75 | VisibilityChanged(null, isVisible); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/Helpers/ProjectHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices; 6 | using EnvDTE; 7 | using EnvDTE80; 8 | 9 | namespace BrunchTaskRunner 10 | { 11 | public static class ProjectHelpers 12 | { 13 | private static DTE2 _dte = BrunchPackage.Dte; 14 | 15 | public static void CheckFileOutOfSourceControl(string file) 16 | { 17 | if (!File.Exists(file) || _dte.Solution.FindProjectItem(file) == null) 18 | return; 19 | 20 | if (_dte.SourceControl.IsItemUnderSCC(file) && !_dte.SourceControl.IsItemCheckedOut(file)) 21 | _dte.SourceControl.CheckOutItem(file); 22 | 23 | FileInfo info = new FileInfo(file) 24 | { 25 | IsReadOnly = false 26 | }; 27 | } 28 | 29 | public static void AddFileToProject(this Project project, string file, string itemType = null) 30 | { 31 | if (project.IsKind(ProjectTypes.ASPNET_5)) 32 | return; 33 | 34 | try 35 | { 36 | if (_dte.Solution.FindProjectItem(file) == null) 37 | { 38 | ProjectItem item = project.ProjectItems.AddFromFile(file); 39 | 40 | if (string.IsNullOrEmpty(itemType) 41 | || project.IsKind(ProjectTypes.WEBSITE_PROJECT) 42 | || project.IsKind(ProjectTypes.UNIVERSAL_APP)) 43 | return; 44 | 45 | item.Properties.Item("ItemType").Value = "None"; 46 | } 47 | } 48 | catch (Exception ex) 49 | { 50 | System.Diagnostics.Debug.Write(ex); 51 | } 52 | } 53 | 54 | public static void AddNestedFile(string parentFile, string newFile) 55 | { 56 | ProjectItem item = _dte.Solution.FindProjectItem(parentFile); 57 | 58 | try 59 | { 60 | if (item == null 61 | || item.ContainingProject == null 62 | || item.ContainingProject.IsKind(ProjectTypes.ASPNET_5)) 63 | return; 64 | 65 | if (item.ProjectItems == null || item.ContainingProject.IsKind(ProjectTypes.UNIVERSAL_APP)) 66 | { 67 | item.ContainingProject.AddFileToProject(newFile); 68 | } 69 | else if (_dte.Solution.FindProjectItem(newFile) == null) 70 | { 71 | item.ProjectItems.AddFromFile(newFile); 72 | } 73 | } 74 | catch (Exception ex) 75 | { 76 | System.Diagnostics.Debug.Write(ex); 77 | } 78 | } 79 | 80 | public static bool IsKind(this Project project, string kindGuid) 81 | { 82 | return project.Kind.Equals(kindGuid, StringComparison.OrdinalIgnoreCase); 83 | } 84 | 85 | public static void DeleteFileFromProject(string file) 86 | { 87 | ProjectItem item = _dte.Solution.FindProjectItem(file); 88 | 89 | if (item == null) 90 | return; 91 | try 92 | { 93 | item.Delete(); 94 | } 95 | catch (Exception ex) 96 | { 97 | System.Diagnostics.Debug.Write(ex); 98 | } 99 | } 100 | 101 | private static IEnumerable GetChildProjects(Project parent) 102 | { 103 | try 104 | { 105 | if (!parent.IsKind(ProjectKinds.vsProjectKindSolutionFolder) && parent.Collection == null) // Unloaded 106 | return Enumerable.Empty(); 107 | 108 | if (!string.IsNullOrEmpty(parent.FullName)) 109 | return new[] { parent }; 110 | } 111 | catch (COMException) 112 | { 113 | return Enumerable.Empty(); 114 | } 115 | 116 | return parent.ProjectItems 117 | .Cast() 118 | .Where(p => p.SubProject != null) 119 | .SelectMany(p => GetChildProjects(p.SubProject)); 120 | } 121 | } 122 | 123 | public static class ProjectTypes 124 | { 125 | public const string ASPNET_5 = "{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}"; 126 | public const string WEBSITE_PROJECT = "{E24C65DC-7377-472B-9ABA-BC803B73C61A}"; 127 | public const string UNIVERSAL_APP = "{262852C6-CD72-467D-83FE-5EEB1973A190}"; 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /src/TaskRunner/TaskRunner.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Threading.Tasks; 7 | using System.Windows.Media; 8 | using System.Windows.Media.Imaging; 9 | using Microsoft.VisualStudio.TaskRunnerExplorer; 10 | 11 | namespace BrunchTaskRunner 12 | { 13 | [TaskRunnerExport("brunch-config.js", "brunch-config.coffee", "config.coffee")] 14 | class TaskRunner : ITaskRunner 15 | { 16 | private static ImageSource _icon; 17 | private List _options = null; 18 | 19 | public TaskRunner() 20 | { 21 | if (_icon == null) 22 | { 23 | string folder = GetExecutableFolder(); 24 | _icon = new BitmapImage(new Uri(Path.Combine(folder, "Resources\\logo.png"))); 25 | } 26 | } 27 | 28 | private void InitializeBrunchRunnerOptions() 29 | { 30 | _options = new List(); 31 | _options.Add(new TaskRunnerOption("Debug", PackageIds.cmdDebug, PackageGuids.guidBrunchPackageCmdSet, false, "--debug")); 32 | } 33 | 34 | public List Options 35 | { 36 | get 37 | { 38 | if (_options == null) 39 | { 40 | InitializeBrunchRunnerOptions(); 41 | } 42 | 43 | return _options; 44 | } 45 | } 46 | 47 | public async Task ParseConfig(ITaskRunnerCommandContext context, string configPath) 48 | { 49 | return await Task.Run(() => 50 | { 51 | ITaskRunnerNode hierarchy = LoadHierarchy(configPath); 52 | 53 | return new TaskRunnerConfig(context, hierarchy, _icon); 54 | }); 55 | } 56 | 57 | private ITaskRunnerNode LoadHierarchy(string configPath) 58 | { 59 | string configFileName = Path.GetFileName(configPath); 60 | string cwd = Path.GetDirectoryName(configPath); 61 | 62 | ITaskRunnerNode root = new TaskRunnerNode("Brunch"); 63 | 64 | // Build 65 | TaskRunnerNode build = new TaskRunnerNode("Build", false); 66 | TaskRunnerNode buildDev = CreateTask(cwd, "build", "Runs 'brunch build'", "/c brunch build"); 67 | build.Children.Add(buildDev); 68 | 69 | TaskRunnerNode buildProd = CreateTask(cwd, "build production", "Runs 'brunch build --production'", "/c brunch build -p"); 70 | build.Children.Add(buildProd); 71 | 72 | root.Children.Add(build); 73 | 74 | // Watch 75 | TaskRunnerNode watch = new TaskRunnerNode("Watch", false); 76 | TaskRunnerNode watchDev = CreateTask(cwd, "watch", "Runs 'brunch watch'", "/c brunch watch"); 77 | watch.Children.Add(watchDev); 78 | 79 | TaskRunnerNode watchProd = CreateTask(cwd, "watch production", "Runs 'brunch watch --production'", "/c brunch watch -p"); 80 | watch.Children.Add(watchProd); 81 | 82 | root.Children.Add(watch); 83 | 84 | return root; 85 | } 86 | 87 | private TaskRunnerNode CreateTask(string cwd, string name, string desc, string args) 88 | { 89 | var task = new TaskRunnerNode(name, true) 90 | { 91 | Description = desc, 92 | Command = GetCommand(cwd, args) 93 | }; 94 | 95 | ApplyOverrides(task); 96 | 97 | return task; 98 | } 99 | 100 | private void ApplyOverrides(ITaskRunnerNode parent) 101 | { 102 | var files = Directory.EnumerateFiles(parent.Command.WorkingDirectory).Where(f => f.Contains(".overrides.")); 103 | 104 | foreach (string file in files) 105 | { 106 | int dot = file.LastIndexOf('.'); 107 | string name = file.Substring(dot + 1); 108 | 109 | var task = new TaskRunnerNode($"env: {name}", true) 110 | { 111 | Description = $"Runs '{parent.Name} --env {name}'", 112 | Command = GetCommand(parent.Command.WorkingDirectory, $"{parent.Command.Args} --env {name}") 113 | }; 114 | 115 | parent.Children.Add(task); 116 | } 117 | } 118 | 119 | private ITaskRunnerCommand GetCommand(string cwd, string arguments) 120 | { 121 | ITaskRunnerCommand command = new TaskRunnerCommand(cwd, "cmd", arguments); 122 | 123 | return command; 124 | } 125 | 126 | private static string GetExecutableFolder() 127 | { 128 | string assembly = Assembly.GetExecutingAssembly().Location; 129 | return Path.GetDirectoryName(assembly); 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Looking to contribute something? **Here's how you can help.** 4 | 5 | Please take a moment to review this document in order to make the contribution 6 | process easy and effective for everyone involved. 7 | 8 | Following these guidelines helps to communicate that you respect the time of 9 | the developers managing and developing this open source project. In return, 10 | they should reciprocate that respect in addressing your issue or assessing 11 | patches and features. 12 | 13 | 14 | ## Using the issue tracker 15 | 16 | The issue tracker is the preferred channel for [bug reports](#bug-reports), 17 | [features requests](#feature-requests) and 18 | [submitting pull requests](#pull-requests), but please respect the 19 | following restrictions: 20 | 21 | * Please **do not** use the issue tracker for personal support requests. Stack 22 | Overflow is a better place to get help. 23 | 24 | * Please **do not** derail or troll issues. Keep the discussion on topic and 25 | respect the opinions of others. 26 | 27 | * Please **do not** open issues or pull requests which *belongs to* third party 28 | components. 29 | 30 | 31 | ## Bug reports 32 | 33 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 34 | Good bug reports are extremely helpful, so thanks! 35 | 36 | Guidelines for bug reports: 37 | 38 | 1. **Use the GitHub issue search** — check if the issue has already been 39 | reported. 40 | 41 | 2. **Check if the issue has been fixed** — try to reproduce it using the 42 | latest `master` or development branch in the repository. 43 | 44 | 3. **Isolate the problem** — ideally create an 45 | [SSCCE](http://www.sscce.org/) and a live example. 46 | Uploading the project on cloud storage (OneDrive, DropBox, et el.) 47 | or creating a sample GitHub repository is also helpful. 48 | 49 | 50 | A good bug report shouldn't leave others needing to chase you up for more 51 | information. Please try to be as detailed as possible in your report. What is 52 | your environment? What steps will reproduce the issue? What browser(s) and OS 53 | experience the problem? Do other browsers show the bug differently? What 54 | would you expect to be the outcome? All these details will help people to fix 55 | any potential bugs. 56 | 57 | Example: 58 | 59 | > Short and descriptive example bug report title 60 | > 61 | > A summary of the issue and the Visual Studio, browser, OS environments 62 | > in which it occurs. If suitable, include the steps required to reproduce the bug. 63 | > 64 | > 1. This is the first step 65 | > 2. This is the second step 66 | > 3. Further steps, etc. 67 | > 68 | > `` - a link to the project/file uploaded on cloud storage or other publicly accessible medium. 69 | > 70 | > Any other information you want to share that is relevant to the issue being 71 | > reported. This might include the lines of code that you have identified as 72 | > causing the bug, and potential solutions (and your opinions on their 73 | > merits). 74 | 75 | 76 | ## Feature requests 77 | 78 | Feature requests are welcome. But take a moment to find out whether your idea 79 | fits with the scope and aims of the project. It's up to *you* to make a strong 80 | case to convince the project's developers of the merits of this feature. Please 81 | provide as much detail and context as possible. 82 | 83 | 84 | ## Pull requests 85 | 86 | Good pull requests, patches, improvements and new features are a fantastic 87 | help. They should remain focused in scope and avoid containing unrelated 88 | commits. 89 | 90 | **Please ask first** before embarking on any significant pull request (e.g. 91 | implementing features, refactoring code, porting to a different language), 92 | otherwise you risk spending a lot of time working on something that the 93 | project's developers might not want to merge into the project. 94 | 95 | Please adhere to the [coding guidelines](#code-guidelines) used throughout the 96 | project (indentation, accurate comments, etc.) and any other requirements 97 | (such as test coverage). 98 | 99 | Adhering to the following process is the best way to get your work 100 | included in the project: 101 | 102 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 103 | and configure the remotes: 104 | 105 | ```bash 106 | # Clone your fork of the repo into the current directory 107 | git clone https://github.com//.git 108 | # Navigate to the newly cloned directory 109 | cd 110 | # Assign the original repo to a remote called "upstream" 111 | git remote add upstream https://github.com/madskristensen/.git 112 | ``` 113 | 114 | 2. If you cloned a while ago, get the latest changes from upstream: 115 | 116 | ```bash 117 | git checkout master 118 | git pull upstream master 119 | ``` 120 | 121 | 3. Create a new topic branch (off the main project development branch) to 122 | contain your feature, change, or fix: 123 | 124 | ```bash 125 | git checkout -b 126 | ``` 127 | 128 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 129 | message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 130 | or your code is unlikely be merged into the main project. Use Git's 131 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 132 | feature to tidy up your commits before making them public. Also, prepend name of the feature 133 | to the commit message. For instance: "SCSS: Fixes compiler results for IFileListener.\nFixes `#123`" 134 | 135 | 5. Locally merge (or rebase) the upstream development branch into your topic branch: 136 | 137 | ```bash 138 | git pull [--rebase] upstream master 139 | ``` 140 | 141 | 6. Push your topic branch up to your fork: 142 | 143 | ```bash 144 | git push origin 145 | ``` 146 | 147 | 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 148 | with a clear title and description against the `master` branch. 149 | 150 | 151 | ## Code guidelines 152 | 153 | - Always use proper indentation. 154 | - In Visual Studio under `Tools > Options > Text Editor > C# > Advanced`, make sure 155 | `Place 'System' directives first when sorting usings` option is enabled (checked). 156 | - Before committing, organize usings for each updated C# source file. Either you can 157 | right-click editor and select `Organize Usings > Remove and sort` OR use extension 158 | like [BatchFormat](http://visualstudiogallery.msdn.microsoft.com/a7f75c34-82b4-4357-9c66-c18e32b9393e). 159 | - Before committing, run Code Analysis in `Debug` configuration and follow the guidelines 160 | to fix CA issues. Code Analysis commits can be made separately. 161 | -------------------------------------------------------------------------------- /src/source.extension.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Brunch Task Runner 122 | 123 | 124 | Adds support for the Brunch build tool in Visual Studio's Task Runner Explorer. 125 | 126 | 127 | 128 | source.extension.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | -------------------------------------------------------------------------------- /src/BrunchTaskRunner.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $(VisualStudioVersion) 6 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 7 | 8 | 9 | true 10 | 11 | 12 | 13 | Program 14 | $(DevEnvDir)\devenv.exe 15 | /rootsuffix Exp 16 | 17 | 18 | 19 | Debug 20 | AnyCPU 21 | 2.0 22 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 23 | {94660BCF-169A-42E1-BD84-345449743069} 24 | Library 25 | Properties 26 | BrunchTaskRunner 27 | BrunchTaskRunner 28 | v4.6 29 | true 30 | true 31 | true 32 | true 33 | true 34 | false 35 | 36 | 37 | true 38 | full 39 | false 40 | bin\Debug\ 41 | DEBUG;TRACE 42 | prompt 43 | 4 44 | 45 | 46 | pdbonly 47 | true 48 | bin\Release\ 49 | TRACE 50 | prompt 51 | 4 52 | 53 | 54 | $([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\..\packages\TemplateBuilder.1.1.4.5-beta\tools\ligershark.templates.targets )) 55 | 56 | 57 | 58 | 59 | 60 | 61 | source.extension.vsixmanifest 62 | 63 | 64 | 65 | True 66 | True 67 | VsCommandTable.vsct 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | Resources\LICENSE 78 | true 79 | 80 | 81 | source.extension.vsixmanifest 82 | 83 | 84 | 85 | 86 | 87 | Designer 88 | VsixManifestGenerator 89 | source.extension.resx 90 | 91 | 92 | 93 | 94 | False 95 | 96 | 97 | False 98 | 99 | 100 | False 101 | 102 | 103 | False 104 | 105 | 106 | 107 | 108 | False 109 | 110 | 111 | ..\packages\Microsoft.VisualStudio.CoreUtility.14.2.25123\lib\net45\Microsoft.VisualStudio.CoreUtility.dll 112 | True 113 | 114 | 115 | ..\packages\Microsoft.VisualStudio.Imaging.14.2.25123\lib\net45\Microsoft.VisualStudio.Imaging.dll 116 | True 117 | 118 | 119 | ..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll 120 | True 121 | 122 | 123 | ..\packages\Microsoft.VisualStudio.Shell.14.0.14.2.25123\lib\Microsoft.VisualStudio.Shell.14.0.dll 124 | True 125 | 126 | 127 | ..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll 128 | True 129 | 130 | 131 | ..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll 132 | True 133 | 134 | 135 | ..\packages\Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003\lib\net45\Microsoft.VisualStudio.Shell.Immutable.12.0.dll 136 | True 137 | 138 | 139 | ..\packages\Microsoft.VisualStudio.Shell.Immutable.14.0.14.2.25123\lib\net45\Microsoft.VisualStudio.Shell.Immutable.14.0.dll 140 | True 141 | 142 | 143 | ..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll 144 | True 145 | 146 | 147 | True 148 | ..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll 149 | True 150 | 151 | 152 | True 153 | ..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll 154 | True 155 | 156 | 157 | True 158 | ..\packages\Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110\lib\Microsoft.VisualStudio.Shell.Interop.12.0.dll 159 | True 160 | 161 | 162 | ..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll 163 | True 164 | 165 | 166 | ..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll 167 | True 168 | 169 | 170 | False 171 | 172 | 173 | ..\packages\Microsoft.VisualStudio.Text.Data.14.2.25123\lib\net45\Microsoft.VisualStudio.Text.Data.dll 174 | True 175 | 176 | 177 | ..\packages\Microsoft.VisualStudio.Text.Logic.14.2.25123\lib\net45\Microsoft.VisualStudio.Text.Logic.dll 178 | True 179 | 180 | 181 | ..\packages\Microsoft.VisualStudio.Text.UI.14.2.25123\lib\net45\Microsoft.VisualStudio.Text.UI.dll 182 | True 183 | 184 | 185 | ..\packages\Microsoft.VisualStudio.Text.UI.Wpf.14.2.25123\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll 186 | True 187 | 188 | 189 | ..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll 190 | True 191 | 192 | 193 | ..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll 194 | True 195 | 196 | 197 | ..\packages\Microsoft.VisualStudio.Threading.14.1.131\lib\net45\Microsoft.VisualStudio.Threading.dll 198 | True 199 | 200 | 201 | ..\packages\Microsoft.VisualStudio.Utilities.14.2.25123\lib\net45\Microsoft.VisualStudio.Utilities.dll 202 | True 203 | 204 | 205 | ..\packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll 206 | True 207 | 208 | 209 | 210 | 211 | False 212 | 213 | 214 | 215 | 216 | 217 | 218 | ..\packages\TemplateBuilder.1.1.4.5-beta\lib\TemplateBuilder.dll 219 | False 220 | 221 | 222 | 223 | 224 | 225 | Menus.ctmenu 226 | VsctGenerator 227 | VsCommandTable.cs 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | true 236 | 237 | 238 | true 239 | 240 | 241 | Always 242 | true 243 | 244 | 245 | true 246 | 247 | 248 | 249 | 250 | True 251 | True 252 | source.extension.vsixmanifest 253 | true 254 | VSPackage 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 283 | --------------------------------------------------------------------------------