├── .gitattributes ├── .github ├── CONTRIBUTING.md └── ISSUE_TEMPLATE.md ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── WebExtensionPack.sln ├── appveyor.yml ├── art └── progress.png ├── lib └── Microsoft.VisualStudio.ExtensionManager.dll └── src ├── Commands └── ResetExtensions.cs ├── Controls ├── ExtensionItem.xaml └── ExtensionItem.xaml.cs ├── DataStore.cs ├── ExtensionList.cs ├── Helpers └── Logger.cs ├── Installer ├── GalleryEntry.cs ├── InstallerProgress.xaml └── InstallerProgress.xaml.cs ├── Properties └── AssemblyInfo.cs ├── Resources ├── Icon.png └── Preview.png ├── VSCommandTable.cs ├── VSCommandTable.vsct ├── VSPackage.cs ├── WebExtensionPack.csproj ├── packages.config ├── source.extension.cs ├── source.extension.ico ├── source.extension.resx └── source.extension.vsixmanifest /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Suggest an extension: 2 | Add the name and a link to the VS Gallery download page. 3 | 4 | 5 | ...or report a bug: 6 | 7 | ### Installed product versions 8 | - Visual Studio: [example 2015 Professional] 9 | - This extension: [example 1.1.21] 10 | 11 | ### Description 12 | Replace this text with a short description 13 | 14 | ### Steps to recreate 15 | 1. Replace this 16 | 2. text with 17 | 3. the steps 18 | 4. to recreate 19 | 20 | ### Current behavior 21 | Explain what it's doing and why it's wrong 22 | 23 | ### Expected behavior 24 | Explain what it should be doing after it's fixed. -------------------------------------------------------------------------------- /.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 -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Road map 2 | 3 | - [ ] Nothing yet... 4 | 5 | Features that have a checkmark are complete and available for 6 | download in the 7 | [nightly build](http://vsixgallery.com/extension/92e3e73b-510f-45bb-8aee-c637e83778b3/). 8 | 9 | # Change log 10 | 11 | These are the changes to each version that has been released 12 | on the official Visual Studio extension gallery. 13 | 14 | ## 1.9 15 | 16 | - [x] Added [Package Security Alerts](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.PackageSecurityAlerts) extension 17 | 18 | ## 1.7 19 | 20 | - [x] Added [Syntax Highlighting Pack](https://visualstudiogallery.msdn.microsoft.com/d92fd742-bab3-4314-b866-50b871d679ee) extension 21 | 22 | ## 1.6 23 | 24 | - [x] Added [File Icons](https://visualstudiogallery.msdn.microsoft.com/5e1762e8-a88b-417c-8467-6a65d771cc4e) extension 25 | 26 | ## 1.5 27 | 28 | - [x] Don't re-install extensions that have been uninstalled 29 | - [x] Button to reset installed extensions 30 | 31 | ## 1.4 32 | 33 | - [x] Added [Image Sprites](https://visualstudiogallery.msdn.microsoft.com/8bb845e9-5717-4eae-aed3-1fdf6fe5819a) extension 34 | 35 | ## 1.3 36 | 37 | - [x] Added [Web Accessibility Checker](https://visualstudiogallery.msdn.microsoft.com/3aabefab-1681-4fea-8f95-6a62e2f0f1ec) extension 38 | - [x] Added list of installed extensions to restart prompt 39 | 40 | ## 1.2 41 | 42 | - [x] Updated install progress dialog 43 | - [x] Added [Suggested Extensions](https://visualstudiogallery.msdn.microsoft.com/3be88243-8bf1-407a-a7ca-a968d0de2d59) extension 44 | - [x] Added [Add New File](http://visualstudiogallery.msdn.microsoft.com/3f820e99-6c0d-41db-aa74-a18d9623b1f3) extension -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Web Extension Pack 2 | 3 | [![Build status](https://ci.appveyor.com/api/projects/status/7yqisx9nepdo5auu?svg=true)](https://ci.appveyor.com/project/madskristensen/webextensionpack) 4 | 5 | Download the extension at the 6 | [VS Gallery](https://visualstudiogallery.msdn.microsoft.com/f3b504c6-0095-42f1-a989-51d5fc2a8459) 7 | or get the 8 | [nightly build](http://vsixgallery.com/extension/92e3e73b-510f-45bb-8aee-c637e83778b3/) 9 | 10 | ------------------------------------ 11 | 12 | A Visual Studio extension that installs a short list of 13 | highly valuable extensions targeted web development. 14 | 15 | See the [change log](CHANGELOG.md) for changes and road map. 16 | 17 | ## Extensions 18 | After installing the Web Extension Pack and restarting 19 | Visual Studio, the following extensions will be installed: 20 | 21 | - [Add New File](https://visualstudiogallery.msdn.microsoft.com/3f820e99-6c0d-41db-aa74-a18d9623b1f3) 22 | - [Browser Reload on Save](https://visualstudiogallery.msdn.microsoft.com/46eef4d9-045b-4596-bd7f-eee980bb5450) 23 | - [Browser Sync](https://visualstudiogallery.msdn.microsoft.com/5741a548-5179-4a77-ad96-fca71535774d) 24 | - [Bundler & Minifier](https://visualstudiogallery.msdn.microsoft.com/9ec27da7-e24b-4d56-8064-fd7e88ac1c40) 25 | - [Editor Enhancements](https://visualstudiogallery.msdn.microsoft.com/4f64e542-3772-4136-8f87-0113441c7aa1) 26 | - [File Icons](https://visualstudiogallery.msdn.microsoft.com/5e1762e8-a88b-417c-8467-6a65d771cc4e) 27 | - [File Nesting](https://visualstudiogallery.msdn.microsoft.com/3ebde8fb-26d8-4374-a0eb-1e4e2665070c) 28 | - [HTML Snippet Pack](https://visualstudiogallery.msdn.microsoft.com/57a8ac31-775a-428c-ade9-6837d183a4dc) 29 | - [Image Sprites](https://visualstudiogallery.msdn.microsoft.com/8bb845e9-5717-4eae-aed3-1fdf6fe5819a) 30 | - [Image Optimizer](https://visualstudiogallery.msdn.microsoft.com/a56eddd3-d79b-48ac-8c8f-2db06ade77c3) 31 | - [JavaScript Snippet Pack](https://visualstudiogallery.msdn.microsoft.com/423eb4a3-215f-4a8f-9287-1512618ffda3) 32 | - [Markdown Editor](https://visualstudiogallery.msdn.microsoft.com/eaab33c3-437b-4918-8354-872dfe5d1bfe) 33 | - [Open Command Line](https://visualstudiogallery.msdn.microsoft.com/4e84e2cf-2d6b-472a-b1e2-b84932511379) 34 | - [Package Installer](https://visualstudiogallery.msdn.microsoft.com/753b9720-1638-4f9a-ad8d-2c45a410fd74) 35 | - [Suggested Extensions](https://visualstudiogallery.msdn.microsoft.com/3be88243-8bf1-407a-a7ca-a968d0de2d59) 36 | - [Package Security Alerts](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.PackageSecurityAlerts) 37 | - [Syntax Highlighting Pack](https://visualstudiogallery.msdn.microsoft.com/d92fd742-bab3-4314-b866-50b871d679ee) 38 | - [Web Accessibility Checker](https://visualstudiogallery.msdn.microsoft.com/3aabefab-1681-4fea-8f95-6a62e2f0f1ec) 39 | - [Web Compiler](https://visualstudiogallery.msdn.microsoft.com/3b329021-cd7a-4a01-86fc-714c2d05bb6c) 40 | - [Web Essentials 2015](https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2) 41 | 42 | If you already have one or more of these extensions installed, 43 | Web Extension Pack will not re-install them. It will simply 44 | just skip them. 45 | 46 | ### Honorable mentions 47 | These extensions are not included, but they are likely to be of 48 | interest. 49 | 50 | - [.ignore](https://visualstudiogallery.msdn.microsoft.com/d0eba56d-603b-45ab-a680-edfda585f7f3) 51 | - [NPM Task Runner](https://visualstudiogallery.msdn.microsoft.com/8f2f2cbc-4da5-43ba-9de2-c9d08ade4941) 52 | - [Client-Side Library Installer](https://visualstudiogallery.msdn.microsoft.com/4cd5e0e0-2c38-426b-9f43-1d3688cc8be1) 53 | - [Open in VS Code](https://visualstudiogallery.msdn.microsoft.com/33f6f3fd-68e8-4783-b934-ece91a08d265) 54 | - [SideWaffle Template Pack](https://visualstudiogallery.msdn.microsoft.com/a16c2d07-b2e1-4a25-87d9-194f04e7a698) 55 | - [Text Generator](https://visualstudiogallery.msdn.microsoft.com/4d809607-87dd-445c-8cd4-585da67c6beb) 56 | - [Trailing Whitespace Visualizer](https://visualstudiogallery.msdn.microsoft.com/a204e29b-1778-4dae-affd-209bea658a59) 57 | 58 | ## Installing 59 | It doesn't take long to install the extensions. Probably less 60 | than a minute. 61 | 62 | ![Installing progress](art/progress.png) 63 | 64 | When installation is done you will be prompted to restart 65 | Visual Studio. After the restart, all the extensions are 66 | fully functional and ready to use. 67 | 68 | ## Reset Web Extension Pack 69 | If you've uninstalled any of the extensions installed by Web Extension 70 | Pack, then those extensions won't be installed again automatically. 71 | 72 | To reset this behavior go to _Tools -> Reset Web Extension Pack..._ 73 | 74 | ## Suggest new extensions 75 | If you know of any good extensions that you think would benefit web 76 | developers, then log an issue with the suggestion on the 77 | [GitHub issue tracker](https://github.com/madskristensen/WebExtensionPack/issues). 78 | 79 | ## Contribute 80 | Check out the [contribution guidelines](.github/CONTRIBUTING.md) 81 | if you want to contribute to this project. 82 | 83 | For cloning and building this project yourself, make sure 84 | to install the 85 | [Extensibility Tools 2015](https://visualstudiogallery.msdn.microsoft.com/ab39a092-1343-46e2-b0f1-6a3f91155aa6) 86 | extension for Visual Studio which enables some features 87 | used by this project. 88 | 89 | ## License 90 | [Apache 2.0](LICENSE) -------------------------------------------------------------------------------- /WebExtensionPack.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}") = "WebExtensionPack", "src\WebExtensionPack.csproj", "{D5750D1B-78E2-458D-AC17-802394EB81A0}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{209371F6-5AF1-4FCA-9B1A-37702D5BD935}" 9 | ProjectSection(SolutionItems) = preProject 10 | appveyor.yml = appveyor.yml 11 | CHANGELOG.md = CHANGELOG.md 12 | README.md = README.md 13 | EndProjectSection 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Debug|x86 = Debug|x86 19 | Release|Any CPU = Release|Any CPU 20 | Release|x86 = Release|x86 21 | EndGlobalSection 22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 23 | {D5750D1B-78E2-458D-AC17-802394EB81A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {D5750D1B-78E2-458D-AC17-802394EB81A0}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {D5750D1B-78E2-458D-AC17-802394EB81A0}.Debug|x86.ActiveCfg = Debug|Any CPU 26 | {D5750D1B-78E2-458D-AC17-802394EB81A0}.Debug|x86.Build.0 = Debug|Any CPU 27 | {D5750D1B-78E2-458D-AC17-802394EB81A0}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {D5750D1B-78E2-458D-AC17-802394EB81A0}.Release|Any CPU.Build.0 = Release|Any CPU 29 | {D5750D1B-78E2-458D-AC17-802394EB81A0}.Release|x86.ActiveCfg = Release|Any CPU 30 | {D5750D1B-78E2-458D-AC17-802394EB81A0}.Release|x86.Build.0 = Release|Any CPU 31 | EndGlobalSection 32 | GlobalSection(SolutionProperties) = preSolution 33 | HideSolutionNode = FALSE 34 | EndGlobalSection 35 | GlobalSection(CodealikeProperties) = postSolution 36 | SolutionGuid = 67682906-08a4-438e-a745-8745ea6b9639 37 | EndGlobalSection 38 | EndGlobal 39 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | image: Visual Studio 2015 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 webextensionpack 19 | 20 | deploy: 21 | - provider: Environment 22 | name: Chocolatey 23 | on: 24 | branch: master 25 | appveyor_repo_commit_message_extended: /\[release\]/ -------------------------------------------------------------------------------- /art/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/WebExtensionPack/7c09fa6fb3a75247b0eb60f171a38abaa2d83bbe/art/progress.png -------------------------------------------------------------------------------- /lib/Microsoft.VisualStudio.ExtensionManager.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/WebExtensionPack/7c09fa6fb3a75247b0eb60f171a38abaa2d83bbe/lib/Microsoft.VisualStudio.ExtensionManager.dll -------------------------------------------------------------------------------- /src/Commands/ResetExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.Design; 3 | using System.Windows; 4 | using EnvDTE; 5 | using EnvDTE80; 6 | using Microsoft.VisualStudio.Shell; 7 | using Microsoft.VisualStudio.Shell.Interop; 8 | 9 | namespace WebExtensionPack 10 | { 11 | internal sealed class ResetExtensions 12 | { 13 | private readonly Package _package; 14 | 15 | private ResetExtensions(Package package) 16 | { 17 | _package = package; 18 | 19 | OleMenuCommandService commandService = (OleMenuCommandService)ServiceProvider.GetService(typeof(IMenuCommandService)); 20 | if (commandService != null) 21 | { 22 | var menuCommandID = new CommandID(PackageGuids.guidVSPackageCmdSet, PackageIds.ResetExtensions); 23 | var menuItem = new MenuCommand(Execute, menuCommandID); 24 | commandService.AddCommand(menuItem); 25 | } 26 | } 27 | 28 | public static ResetExtensions Instance { get; private set; } 29 | 30 | private IServiceProvider ServiceProvider 31 | { 32 | get { return _package; } 33 | } 34 | 35 | public static void Initialize(Package package) 36 | { 37 | Instance = new ResetExtensions(package); 38 | } 39 | 40 | private void Execute(object sender, EventArgs e) 41 | { 42 | string message = "This will reset Web Extension Pack and restart Visual Studio.\r\n\r\nDo you wish to continue?"; 43 | 44 | var answer = VsShellUtilities.ShowMessageBox( 45 | ServiceProvider, 46 | message, 47 | Vsix.Name, 48 | OLEMSGICON.OLEMSGICON_QUERY, 49 | OLEMSGBUTTON.OLEMSGBUTTON_OKCANCEL, 50 | OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); 51 | 52 | if (answer == (int)MessageBoxResult.OK) 53 | { 54 | var store = new DataStore(); 55 | 56 | if (store.Reset()) 57 | { 58 | IVsShell4 shell = (IVsShell4)ServiceProvider.GetService(typeof(SVsShell)); 59 | shell.Restart((uint)__VSRESTARTTYPE.RESTART_Normal); 60 | } 61 | else 62 | { 63 | var dte = (DTE2)ServiceProvider.GetService(typeof(DTE)); 64 | dte.StatusBar.Text = "An error occured. Please see output window for details."; 65 | } 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Controls/ExtensionItem.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 13 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 50 | 52 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 69 | 70 | 71 | 72 | 73 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 84 | 91 | 92 | 93 | 94 | 95 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /src/Controls/ExtensionItem.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace WebExtensionPack.Controls 17 | { 18 | /// 19 | /// Interaction logic for ExtensionItem.xaml 20 | /// 21 | public partial class ExtensionItem : UserControl 22 | { 23 | public string ExtensionGuid { get; } 24 | 25 | public ExtensionItem(string extensionGuid, string extensionName) 26 | { 27 | InitializeComponent(); 28 | 29 | this.ExtensionGuid = extensionGuid; 30 | this.ExtensionName.Text = extensionName; 31 | } 32 | 33 | public void StartDownloading() 34 | { 35 | GridTick.Visibility = Visibility.Collapsed; 36 | GridPending.Visibility = Visibility.Collapsed; 37 | GridLoading.Visibility = Visibility.Visible; 38 | } 39 | 40 | public void SetAsComplete() 41 | { 42 | GridPending.Visibility = Visibility.Collapsed; 43 | GridLoading.Visibility = Visibility.Collapsed; 44 | GridTick.Visibility = Visibility.Visible; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/DataStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | 6 | namespace WebExtensionPack 7 | { 8 | public class DataStore 9 | { 10 | private static string _configFile; 11 | 12 | public DataStore() 13 | { 14 | _configFile = Environment.ExpandEnvironmentVariables("%userprofile%\\.webextensionpack"); 15 | Initialize(); 16 | } 17 | 18 | public List PreviouslyInstalledExtensions { get; private set; } = new List(); 19 | 20 | public bool HasBeenInstalled(string productId) 21 | { 22 | return PreviouslyInstalledExtensions.Contains(productId); 23 | } 24 | 25 | public void Save() 26 | { 27 | File.WriteAllLines(_configFile, PreviouslyInstalledExtensions); 28 | } 29 | 30 | public bool Reset() 31 | { 32 | try 33 | { 34 | File.Delete(_configFile); 35 | return true; 36 | } 37 | catch (Exception ex) 38 | { 39 | Logger.Log(ex); 40 | return false; 41 | } 42 | } 43 | 44 | private void Initialize() 45 | { 46 | try 47 | { 48 | if (File.Exists(_configFile)) 49 | PreviouslyInstalledExtensions = File.ReadAllLines(_configFile).Where(l => !string.IsNullOrWhiteSpace(l)).ToList(); 50 | } 51 | catch (Exception ex) 52 | { 53 | Logger.Log(ex); 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/ExtensionList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace WebExtensionPack 4 | { 5 | class ExtensionList 6 | { 7 | public static IDictionary Products() 8 | { 9 | return new Dictionary { 10 | { "5fb7364d-2e8c-44a4-95eb-2a382e30fec9", "Web Essentials" }, 11 | { "148ffa77-d70a-407f-892b-9ee542346862", "Web Compiler"}, 12 | { "bf95754f-93d3-42ff-bfe3-e05d23188b08", "Image optimizer"}, 13 | //{ "950d05f7-bb25-43ce-b682-44b377b5307d", "Glyphfriend"}, 14 | { "f4ab1e64-5d35-4f06-bad9-bf414f4b3bbb", "Open Command Line"}, 15 | { "fdd64809-376e-4542-92ce-808a8df06bcc", "Package Installer"}, 16 | { "10d9b3af-1338-4c45-bc99-4ec38c3a11fb", "Browser Sync"}, 17 | { "2d8aa02a-8810-421f-97b9-86efc573fea3", "Browser Reload on Save"}, 18 | { "2a20580c-7be4-4440-bcd6-8dcf5aa2004e", "JavaScript Snippet Pack" }, 19 | { "51b81721-cf4e-4ce0-a595-972b1ca2a186", "Suggested Extensions" }, 20 | { "2E78AA18-E864-4FBB-B8C8-6186FC865DB3", "Add New File" }, 21 | { "25a79d25-0fff-4748-afaa-3a67ed116bc9", "Web Accessibility Checker" }, 22 | { "a0ae318b-4f07-4f71-93cb-f21d3f03c6d3", "Bundler & Minifier" }, 23 | { "6c799bc4-0d4c-4172-98bc-5d464b612dca", "File Nesting" }, 24 | { "a3112f81-e423-4f88-9f2c-e089a309e48e", "Editor Enhancements" }, 25 | { "cd92c0c6-2c32-49a3-83ca-0dc767c7d78e", "Image Sprites" }, 26 | { "9ca64947-e9ca-4543-bfb8-6cce9be19fd6", "Markdown Editor" }, 27 | { "7f30a50b-8211-40cf-b881-bd1eb2866478", "HTML Snippet Pack" }, 28 | { "3a7b4930-a5fb-46ec-a9b8-9610c8f953b8", "File Icons" }, 29 | { "4773ce75-6f30-4269-9557-1f7c30a47be2", "Syntax Highlighting Pack"}, 30 | { "1fd37423-142f-4267-8221-93163d573b90", "Package Security Alerts"} 31 | }; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Helpers/Logger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics.CodeAnalysis; 3 | using Microsoft.VisualStudio.Shell.Interop; 4 | 5 | public static class Logger 6 | { 7 | private static IVsOutputWindowPane pane; 8 | private static object _syncRoot = new object(); 9 | private static IServiceProvider _provider; 10 | private static string _name; 11 | 12 | public static void Initialize(IServiceProvider provider, string name) 13 | { 14 | _provider = provider; 15 | _name = name; 16 | } 17 | 18 | [SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "Microsoft.VisualStudio.Shell.Interop.IVsOutputWindowPane.OutputString(System.String)")] 19 | public static void Log(string message) 20 | { 21 | if (string.IsNullOrEmpty(message)) 22 | return; 23 | 24 | try 25 | { 26 | if (EnsurePane()) 27 | { 28 | pane.OutputString(DateTime.Now.ToString() + ": " + message + Environment.NewLine); 29 | } 30 | } 31 | catch 32 | { 33 | // Do nothing 34 | } 35 | } 36 | 37 | public static void Log(Exception ex) 38 | { 39 | if (ex != null) 40 | { 41 | Log(ex.ToString()); 42 | } 43 | } 44 | 45 | private static bool EnsurePane() 46 | { 47 | if (pane == null) 48 | { 49 | Guid guid = Guid.NewGuid(); 50 | IVsOutputWindow output = (IVsOutputWindow)_provider.GetService(typeof(SVsOutputWindow)); 51 | output.CreatePane(ref guid, _name, 1, 1); 52 | output.GetPane(ref guid, out pane); 53 | } 54 | 55 | return pane != null; 56 | } 57 | } -------------------------------------------------------------------------------- /src/Installer/GalleryEntry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.ExtensionManager; 3 | 4 | namespace WebExtensionPack 5 | { 6 | public class GalleryEntry : IRepositoryEntry 7 | { 8 | private Version _nonNullVsixVersion; 9 | 10 | public string VsixID { get; set; } 11 | public string DownloadUrl { get; set; } 12 | public string DownloadUpdateUrl { get; set; } 13 | public string VsixReferences { get; set; } 14 | public string VsixVersion { get; set; } 15 | public string Name { get; set; } 16 | public int Ranking { get; set; } 17 | 18 | public Version NonNullVsixVersion 19 | { 20 | get 21 | { 22 | if (_nonNullVsixVersion == null) 23 | { 24 | if (!Version.TryParse(VsixVersion, out _nonNullVsixVersion)) 25 | { 26 | _nonNullVsixVersion = new Version(); 27 | } 28 | } 29 | 30 | return _nonNullVsixVersion; 31 | } 32 | } 33 | 34 | public override string ToString() 35 | { 36 | return Name; 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/Installer/InstallerProgress.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |