├── .gitignore ├── art ├── animation.gif └── snippet-manager.png ├── src ├── Resources │ └── Icon.png ├── Snippets │ ├── snippets.pkgdef │ └── GulpSnippetPack │ │ ├── gulpvar.snippet │ │ ├── gulpdest.snippet │ │ ├── gulptask.snippet │ │ ├── gulp.snippet │ │ ├── gulpwcb.snippet │ │ ├── gulpwatch.snippet │ │ ├── gulpsrc.snippet │ │ ├── gulptaskdep.snippet │ │ └── gulptaskfull.snippet ├── source.extension.vsixmanifest └── GulpSnippetPack.csproj ├── .github ├── ISSUE_TEMPLATE.md └── CONTRIBUTING.md ├── appveyor.yml ├── .gitattributes ├── LICENSE ├── GulpSnippetPack.sln └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | 4 | .vs 5 | bin 6 | obj -------------------------------------------------------------------------------- /art/animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/GulpSnippetPack/master/art/animation.gif -------------------------------------------------------------------------------- /src/Resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/GulpSnippetPack/master/src/Resources/Icon.png -------------------------------------------------------------------------------- /art/snippet-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/GulpSnippetPack/master/art/snippet-manager.png -------------------------------------------------------------------------------- /src/Snippets/snippets.pkgdef: -------------------------------------------------------------------------------- 1 | 2 | [$RootKey$\Languages\CodeExpansions\JavaScript\Paths] 3 | "Snippets"="$PackageFolder$\GulpSnippetPack" -------------------------------------------------------------------------------- /.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. -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | image: Visual Studio 2019 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 | 9 | build_script: 10 | - nuget restore -Verbosity quiet 11 | - msbuild /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m 12 | 13 | after_test: 14 | - ps: Vsix-PushArtifacts | Vsix-PublishToGallery -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2016 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/Snippets/GulpSnippetPack/gulpvar.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulpvar 4 | gulpvar 5 | Mads Kristensen 6 | Code snippet for gulpfile.js 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 |
-------------------------------------------------------------------------------- /src/Snippets/GulpSnippetPack/gulpdest.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulpdest 4 | gulpdest 5 | Mads Kristensen 6 | Code snippet for writing Gulp tasks 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | folder 15 | folder 16 | 17 | 18 | 19 | 20 | 21 | 22 |
-------------------------------------------------------------------------------- /src/Snippets/GulpSnippetPack/gulptask.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulptask 4 | gulptask 5 | Mads Kristensen 6 | Code snippet for writing Gulp tasks 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name of task 16 | name 17 | 18 | 19 | 20 | 23 | 24 | 25 |
-------------------------------------------------------------------------------- /src/Snippets/GulpSnippetPack/gulp.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulp 4 | gulp 5 | Mads Kristensen 6 | Code snippet for gulpfile.js 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name of task 16 | name 17 | 18 | 19 | 20 | 25 | 26 | 27 |
-------------------------------------------------------------------------------- /src/Snippets/GulpSnippetPack/gulpwcb.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulpwcb 4 | gulpwcb 5 | Mads Kristensen 6 | Code snippet for writing Gulp tasks 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | file 15 | file 16 | 17 | 18 | 19 | 23 | 24 | 25 |
-------------------------------------------------------------------------------- /src/Snippets/GulpSnippetPack/gulpwatch.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulpwatch 4 | gulpwatch 5 | Mads Kristensen 6 | Code snippet for writing Gulp tasks 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | file 15 | file 16 | 17 | 18 | tasks 19 | tasks 20 | 21 | 22 | 23 | 24 | 25 | 26 |
-------------------------------------------------------------------------------- /src/Snippets/GulpSnippetPack/gulpsrc.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulpsrc 4 | gulpsrc 5 | Mads Kristensen 6 | Code snippet for writing Gulp tasks 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | src 15 | src 16 | 17 | 18 | plugin 19 | plugin 20 | 21 | 22 | 23 | 25 | 26 | 27 |
-------------------------------------------------------------------------------- /src/Snippets/GulpSnippetPack/gulptaskdep.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulptaskdep 4 | gulptaskdep 5 | Mads Kristensen 6 | Code snippet for writing Gulp tasks 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name of task 16 | name 17 | 18 | 19 | task 20 | Name of task 21 | task 22 | 23 | 24 | 25 | 28 | 29 | 30 |
-------------------------------------------------------------------------------- /GulpSnippetPack.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.25921.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GulpSnippetPack", "src\GulpSnippetPack.csproj", "{5C843AF8-1088-4655-A572-0729269E8A98}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6F24CC8F-8D9C-4384-A39D-2248CC465F03}" 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 | {5C843AF8-1088-4655-A572-0729269E8A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {5C843AF8-1088-4655-A572-0729269E8A98}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {5C843AF8-1088-4655-A572-0729269E8A98}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {5C843AF8-1088-4655-A572-0729269E8A98}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /src/Snippets/GulpSnippetPack/gulptaskfull.snippet: -------------------------------------------------------------------------------- 1 | 2 |
3 | gulptaskfull 4 | gulptaskfull 5 | Mads Kristensen 6 | Code snippet for writing Gulp tasks 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | name 16 | 17 | 18 | tasks 19 | tasks 20 | 21 | 22 | files 23 | files 24 | 25 | 26 | plugin 27 | plugin 28 | 29 | 30 | folder 31 | folder 32 | 33 | 34 | 35 | 40 | 41 | 42 |
-------------------------------------------------------------------------------- /src/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Gulp Snippet Pack 6 | A snippet pack to make you more productive working with the Gulp task runner 7 | https://github.com/madskristensen/GulpSnippetPack 8 | Resources\LICENSE 9 | Resources\Icon.png 10 | Resources\Icon.png 11 | JavaScript, snippets, gulp, tasks 12 | 13 | 14 | 15 | 16 | 17 | 18 | amd64 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gulp Snippet Pack for Visual Studio 2 | 3 | [![Build status](https://ci.appveyor.com/api/projects/status/hautkuty2q2s6227?svg=true)](https://ci.appveyor.com/project/madskristensen/gulpsnippetpack) 4 | 5 | Download this extension from the 6 | [VS Gallery](https://visualstudiogallery.msdn.microsoft.com/9e26d1f9-1baf-4983-8c25-f5f769998d4f) 7 | or get the 8 | [nightly build](http://vsixgallery.com/extension/17c6719c-d92f-4bdb-a145-ea2d6dd70900/). 9 | 10 | ----------------------------------------- 11 | 12 | A snippet pack to make you more productive working with 13 | the Gulp task runner in Visual Studio. 14 | 15 | This extension contains code snippets for Gulp from the 16 | awesome [Gulp Snippets](https://marketplace.visualstudio.com/items?itemName=tanato.vscode-gulp) 17 | extension for VS Code. 18 | 19 | ![Snippets demo](art/animation.gif) 20 | 21 | This extension ships a bunch of useful code snippets for 22 | the JavaScript editor. Get an overview from the 23 | **Code Snippet Manager** in Visual Studio located under 24 | the **Tools** top level menu. 25 | 26 | ![Snippet manager](art/snippet-manager.png) 27 | 28 | ## Snippets 29 | 30 | #### gulp 31 | ``` 32 | var gulp = require('gulp-name'); 33 | 34 | gulp.task("$name$", function () { 35 | // content 36 | }); 37 | ``` 38 | 39 | #### gulpvar 40 | ``` 41 | var gulp = require('gulp'); 42 | ``` 43 | 44 | #### gulpsrc - [Docs](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulpsrcglobs-options) 45 | ``` 46 | gulp.src('scriptFiles') 47 | .pipe(name('file')) 48 | ``` 49 | 50 | #### gulptask - [Docs](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulptaskname-deps-fn) 51 | ``` 52 | gulp.task('name', function() { 53 | // content 54 | }); 55 | ``` 56 | 57 | #### gulptaskdep - [Docs](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulptaskname-deps-fn) 58 | ``` 59 | gulp.task('name', ['tasks'], function() { 60 | // content 61 | }); 62 | ``` 63 | 64 | #### gulpdest - [Docs](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulpdestpath) 65 | ``` 66 | .pipe(gulp.dest('folder')); 67 | ``` 68 | 69 | #### gulpwatch - [Docs](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulpwatchglob-opts-tasks) 70 | ``` 71 | gulp.watch('file', ['tasks']); 72 | ``` 73 | 74 | #### gulpwcb - [Docs](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulpwatchglob-opts-cb) 75 | ``` 76 | gulp.watch('file', function(event) { 77 | console.log(' File '+event.path+' was '+event.type+', running tasks...'); 78 | }); 79 | ``` 80 | 81 | #### gulptaskfull 82 | ``` 83 | gulp.task('name',['tasks'], function() { 84 | gulp.src('files') 85 | .pipe(plugin()) 86 | .pipe(gulp.dest('folder')); 87 | }); 88 | ``` 89 | 90 | ## Contribute 91 | Check out the [contribution guidelines](.github/CONTRIBUTING.md) 92 | if you want to contribute to this project. 93 | 94 | For cloning and building this project yourself, make sure 95 | to install the 96 | [Extensibility Tools 2015](https://visualstudiogallery.msdn.microsoft.com/ab39a092-1343-46e2-b0f1-6a3f91155aa6) 97 | extension for Visual Studio which enables some features 98 | used by this project. 99 | 100 | ## License 101 | [Apache 2.0](LICENSE) -------------------------------------------------------------------------------- /src/GulpSnippetPack.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(VisualStudioVersion) 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | Debug 10 | AnyCPU 11 | 2.0 12 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 13 | {5C843AF8-1088-4655-A572-0729269E8A98} 14 | Library 15 | JavaScriptSnippetPack 16 | JavaScriptSnippetPack 17 | v4.5 18 | false 19 | false 20 | false 21 | false 22 | false 23 | false 24 | Program 25 | $(DevEnvDir)\devenv.exe 26 | /rootsuffix Exp 27 | Normal 28 | 29 | 30 | true 31 | full 32 | false 33 | bin\Debug\ 34 | DEBUG;TRACE 35 | prompt 36 | 4 37 | 38 | 39 | pdbonly 40 | true 41 | bin\Release\ 42 | TRACE 43 | prompt 44 | 4 45 | 46 | 47 | 48 | true 49 | 50 | 51 | Resources\LICENSE 52 | true 53 | 54 | 55 | true 56 | 57 | 58 | true 59 | 60 | 61 | true 62 | 63 | 64 | true 65 | 66 | 67 | true 68 | 69 | 70 | true 71 | 72 | 73 | true 74 | 75 | 76 | true 77 | 78 | 79 | true 80 | 81 | 82 | Designer 83 | 84 | 85 | 86 | 87 | true 88 | 89 | 90 | 91 | 92 | 17.0.2120-preview2 93 | runtime; build; native; contentfiles; analyzers; buildtransitive 94 | all 95 | 96 | 97 | 98 | 99 | 106 | -------------------------------------------------------------------------------- /.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 | --------------------------------------------------------------------------------