├── .gitignore
├── art
├── animation.gif
└── snippet-manager.png
├── src
├── Resources
│ ├── Icon.png
│ └── Preview.png
├── Snippets
│ ├── snippets.pkgdef
│ └── GruntSnippetPack
│ │ ├── grunt-pkg.snippet
│ │ ├── grunt.snippet
│ │ ├── grunt-bower-task.snippet
│ │ ├── grunt-contrib-jshint.snippet
│ │ ├── grunt-contrib-clean.snippet
│ │ ├── grunt-contrib-cssmin.snippet
│ │ ├── grunt-contrib-uglify.snippet
│ │ ├── grunt-typescript.snippet
│ │ ├── grunt-contrib-watch.snippet
│ │ ├── grunt-contrib-sass.snippet
│ │ └── grunt-contrib-less.snippet
├── source.extension.vsixmanifest
└── GruntSnippetPack.csproj
├── .github
├── ISSUE_TEMPLATE.md
└── CONTRIBUTING.md
├── appveyor.yml
├── .gitattributes
├── LICENSE
├── GruntSnippetPack.sln
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.suo
2 | *.user
3 |
4 | .vs
5 | bin
6 | obj
--------------------------------------------------------------------------------
/art/animation.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madskristensen/GruntSnippetPack/master/art/animation.gif
--------------------------------------------------------------------------------
/src/Resources/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madskristensen/GruntSnippetPack/master/src/Resources/Icon.png
--------------------------------------------------------------------------------
/art/snippet-manager.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madskristensen/GruntSnippetPack/master/art/snippet-manager.png
--------------------------------------------------------------------------------
/src/Resources/Preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madskristensen/GruntSnippetPack/master/src/Resources/Preview.png
--------------------------------------------------------------------------------
/src/Snippets/snippets.pkgdef:
--------------------------------------------------------------------------------
1 |
2 | ; VS 2012-2015
3 | [$RootKey$\Languages\CodeExpansions\JavaScript\Paths]
4 | "Snippets"="$PackageFolder$\GruntSnippetPack"
5 |
6 | ; VS 2017
7 | [$RootKey$\Languages\CodeExpansions\TypeScript\Paths]
8 | "Snippets"="$PackageFolder$\GruntSnippetPack"
--------------------------------------------------------------------------------
/.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/GruntSnippetPack/grunt-pkg.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | pkg
4 | Mads Kristensen
5 | pkg
6 | Code snippet for the "pkg" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | grunt
4 | Mads Kristensen
5 | grunt
6 | Code snippet for gruntfile.js
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt-bower-task.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | bower
4 | Mads Kristensen
5 | bower
6 | Code snippet for "grunt-bower-task" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | path
15 | Path to the target directory
16 | wwwroot/lib
17 |
18 |
19 |
20 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt-contrib-jshint.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | jshint
4 | Mads Kristensen
5 | jshint
6 | Code snippet for "grunt-contrib-jshint" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | test
15 | Paths to the .js files for the "test" target.
16 | "test/**/*.js"
17 |
18 |
19 | dev
20 | Paths to the .js files for the "dev" target.
21 | "js/**/*.js"
22 |
23 |
24 |
25 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt-contrib-clean.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | clean
4 | Mads Kristensen
5 | clean
6 | Code snippet for "grunt-contrib-clean" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | build
15 | Paths to delete in the "build" target.
16 | "path/to/dir/one", "path/to/dir/two"
17 |
18 |
19 | prod
20 | Paths to delete in the "prod" target.
21 | "path/to/another/dir/one", "path/to/another/dir/two"
22 |
23 |
24 |
25 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt-contrib-cssmin.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | cssmin
4 | Mads Kristensen
5 | cssmin
6 | Code snippet for "grunt-contrib-cssmin" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | destination
15 | Paths to the where the minified .css file should be stored.
16 | wwwroot/css/site.css
17 |
18 |
19 | source
20 | Paths to the source .css files to minify.
21 | "css/reset.css", "css/site.css"
22 |
23 |
24 |
25 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt-contrib-uglify.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | uglify
4 | Mads Kristensen
5 | uglify
6 | Code snippet for "grunt-contrib-uglify" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | destination
15 | Paths to the where the uglyfied .js file should be stored.
16 | wwwroot/js/site.js
17 |
18 |
19 | source
20 | Paths to the source .js files to uglify.
21 | "js/file1.js", "js/file2.js"
22 |
23 |
24 |
25 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/GruntSnippetPack.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}") = "GruntSnippetPack", "src\GruntSnippetPack.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/GruntSnippetPack/grunt-typescript.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | typescript
4 | Mads Kristensen
5 | typescript
6 | Code snippet for "grunt-typescript" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | source
15 | Paths to the source .ts files to compile.
16 | "typescript/**/*.ts"
17 |
18 |
19 | destination
20 | Paths to the where the compiled .js file should be stored.
21 | wwwroot/js/file.js
22 |
23 |
24 |
25 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Grunt Snippet Pack for Visual Studio
2 |
3 | [](https://ci.appveyor.com/project/madskristensen/gruntsnippetpack)
4 |
5 | Download this extension from the
6 | [VS Gallery](https://visualstudiogallery.msdn.microsoft.com/e88222de-b491-4d15-abf5-db4326200e78)
7 | or get the
8 | [nightly build](http://vsixgallery.com/extension/09fdacb9-6989-453c-9504-6dd52cb46313/).
9 |
10 | -----------------------------------------
11 |
12 | A snippet pack to make you more productive working with
13 | the Grunt task runner.
14 |
15 | 
16 |
17 | This extension ships a bunch of useful code snippets for
18 | the JavaScript editor. Get an overview from the
19 | **Code Snippet Manager** in Visual Studio located under
20 | the **Tools** top level menu.
21 |
22 | 
23 |
24 | ## Contribute
25 | Check out the [contribution guidelines](.github/CONTRIBUTING.md)
26 | if you want to contribute to this project.
27 |
28 | For cloning and building this project yourself, make sure
29 | to install the
30 | [Extensibility Tools 2015](https://visualstudiogallery.msdn.microsoft.com/ab39a092-1343-46e2-b0f1-6a3f91155aa6)
31 | extension for Visual Studio which enables some features
32 | used by this project.
33 |
34 | ## License
35 | [Apache 2.0](LICENSE)
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt-contrib-watch.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | watch
4 | Mads Kristensen
5 | watch
6 | Code snippet for "grunt-contrib-watch" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | target
15 | The name of the target. Is usually the file type, such as "js", "css", "less", "typescript".
16 | typescript
17 |
18 |
19 | files
20 | An array of files to watch.
21 | typescript/**/*.ts
22 |
23 |
24 | tasks
25 | An array of Grunt tasks to execute when the files change.
26 | typescript
27 |
28 |
29 |
30 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt-contrib-sass.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | sass
4 | Mads Kristensen
5 | sass
6 | Code snippet for "grunt-contrib-sass" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | destination
15 | Paths to the where the compiled .css file should be stored.
16 | wwwroot/css/site.css
17 |
18 |
19 | source
20 | Paths to the source .scss files to compile.
21 | sass/site.scss
22 |
23 |
24 |
25 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/source.extension.vsixmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Grunt Snippet Pack
6 | A snippet pack to make you more productive working with the Grunt task runner
7 | https://github.com/madskristensen/GruntSnippetPack
8 | Resources\LICENSE
9 | Resources\Icon.png
10 | Resources\Preview.png
11 | JavaScript, snippets, grunt, tasks
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/Snippets/GruntSnippetPack/grunt-contrib-less.snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | less
4 | Mads Kristensen
5 | less
6 | Code snippet for "grunt-contrib-less" configuration in Grunt
7 |
8 | Expansion
9 |
10 |
11 |
12 |
13 |
14 | destination
15 | Paths to the where the compiled .css file should be stored.
16 | wwwroot/css/site.css
17 |
18 |
19 | source
20 | Paths to the source .less files to compile.
21 | less/site.less
22 |
23 |
24 |
25 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/GruntSnippetPack.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 | GruntSnippetPack
16 | GruntSnippetPack
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 | true
52 |
53 |
54 | Resources\LICENSE
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 | true
83 |
84 |
85 | true
86 |
87 |
88 | true
89 |
90 |
91 | Designer
92 |
93 |
94 |
95 |
96 | true
97 |
98 |
99 |
100 |
101 | 17.0.2120-preview2
102 | runtime; build; native; contentfiles; analyzers; buildtransitive
103 | all
104 |
105 |
106 |
107 |
108 |
115 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------