Skip to content

Commit

Permalink
Inlude only snippets for C#, VB and C++ (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt authored Nov 5, 2023
1 parent 244de8e commit 4909e26
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 82 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,10 @@ jobs:
component:
- name: cpp
directoryName: Snippetica.Cpp
- name: cs
- name: csharp
directoryName: Snippetica.CSharp
- name: html
directoryName: Snippetica.Html
- name: json
directoryName: Snippetica.Json
- name: markdown
directoryName: Snippetica.Markdown
- name: vb
directoryName: Snippetica.VisualBasic
- name: xml
directoryName: Snippetica.Xml
defaults:
run:
working-directory: "src/Snippetica.VisualStudioCode.Vsix/${{ matrix.component.directoryName }}/package"
Expand Down Expand Up @@ -181,17 +173,13 @@ jobs:
matrix:
component:
- name: cpp
- name: cs
- name: html
- name: json
- name: markdown
- name: csharp
- name: vb
- name: xml
steps:
- uses: actions/download-artifact@v3
with:
name: vs_code_extension_${{ matrix.component.name }}
path: vs_code_extension
- run: npm install -g @vscode/vsce
- run: vsce publish -p ${{ secrets.VS_MARKETPLACE_TOKEN }}
- run: vsce publish -p ${{ secrets.VS_MARKETPLACE_TOKEN }} -i "snippetica-${{ matrix.component.name }}-${{ needs.pre_build.outputs.version3 }}.vsix"
working-directory: vs_code_extension
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Remove option to choose member type (method, property etc.) [PR](https://github.com/josefpihrt/snippetica/pull/63)).
- Remove snippet for read-only property (`rpp`) [PR](https://github.com/josefpihrt/snippetica/pull/69)).
- Remove all but C#, VB and C++ snippets [PR](https://github.com/josefpihrt/snippetica/pull/70)).

## [1.0.0] - 2022-10-17

Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Snippetica <img align="left" width="48px" height="48px" src="images/snippetica-logo-small.png" />

A collection of snippets for C\#, C\+\+, HTML, VB and other languages\.
A collection of snippets for C\#, C\+\+ and VB\.

## Snippets for Visual Studio

Expand All @@ -13,9 +13,6 @@ Install extension from [Visual Studio Marketplace](https://marketplace.visualstu
- [C#](https://josefpihrt.github.io/docs/snippetica/vs/csharp)
- [Visual Basic](https://josefpihrt.github.io/docs/snippetica/vs/vb)
- [C++](https://josefpihrt.github.io/docs/snippetica/vs/cpp)
- [HTML](https://josefpihrt.github.io/docs/snippetica/vs/html)
- [XAML](https://josefpihrt.github.io/docs/snippetica/vs/xaml)
- [XML](https://josefpihrt.github.io/docs/snippetica/vs/xml)

## Snippets for VS Code

Expand All @@ -28,5 +25,3 @@ Install extension from [VS Code Marketplace](https://marketplace.visualstudio.co
- [C#](https://josefpihrt.github.io/docs/snippetica/vscode/csharp)
- [Visual Basic](https://josefpihrt.github.io/docs/snippetica/vscode/vb)
- [C++](https://josefpihrt.github.io/docs/snippetica/vscode/cpp)
- [HTML](https://josefpihrt.github.io/docs/snippetica/vscode/html)
- [XML](https://josefpihrt.github.io/docs/snippetica/vscode/xml)
60 changes: 30 additions & 30 deletions src/Snippetica.CodeGeneration.Metadata/Data/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@
{
"path": "Snippetica.CodeGeneration.Metadata/Snippetica.Cpp",
"language": "Cpp"
},
{
"path": "Snippetica.CodeGeneration.Metadata/Snippetica.Html",
"language": "Html",
"tags": [ "GenerateXmlSnippets" ]
},
{
"path": "Snippetica.CodeGeneration.Metadata/Snippetica.Xaml",
"language": "Xaml",
"tags": [ "GenerateXmlSnippets", "ExcludeFromVisualStudioCode", "ExcludeFromDocs" ]
},
{
"path": "Snippetica.CodeGeneration.Metadata/Snippetica.Xml",
"language": "Xml",
"tags": [ "GenerateXmlSnippets" ]
},
{
"path": "Snippetica.CodeGeneration.Metadata/Snippetica.Xml.CodeSnippet",
"language": "Xml",
"tags": [ "NoQuickReference", "ExcludeFromVisualStudioCode", "ExcludeFromDocs" ]
},
{
"path": "Snippetica.CodeGeneration.Metadata/Snippetica.Markdown",
"language": "Markdown",
"tags": [ "GenerateXmlSnippets", "ExcludeFromVisualStudio", "ExcludeFromDocs" ]
},
{
"path": "Snippetica.CodeGeneration.Metadata/Snippetica.Json",
"language": "Json",
"tags": [ "ExcludeFromVisualStudio", "ExcludeFromDocs" ]
}
//{
// "path": "Snippetica.CodeGeneration.Metadata/Snippetica.Html",
// "language": "Html",
// "tags": [ "GenerateXmlSnippets" ]
//},
//{
// "path": "Snippetica.CodeGeneration.Metadata/Snippetica.Xaml",
// "language": "Xaml",
// "tags": [ "GenerateXmlSnippets", "ExcludeFromVisualStudioCode", "ExcludeFromDocs" ]
//},
//{
// "path": "Snippetica.CodeGeneration.Metadata/Snippetica.Xml",
// "language": "Xml",
// "tags": [ "GenerateXmlSnippets" ]
//},
//{
// "path": "Snippetica.CodeGeneration.Metadata/Snippetica.Xml.CodeSnippet",
// "language": "Xml",
// "tags": [ "NoQuickReference", "ExcludeFromVisualStudioCode", "ExcludeFromDocs" ]
//},
//{
// "path": "Snippetica.CodeGeneration.Metadata/Snippetica.Markdown",
// "language": "Markdown",
// "tags": [ "GenerateXmlSnippets", "ExcludeFromVisualStudio", "ExcludeFromDocs" ]
//},
//{
// "path": "Snippetica.CodeGeneration.Metadata/Snippetica.Json",
// "language": "Json",
// "tags": [ "ExcludeFromVisualStudio", "ExcludeFromDocs" ]
//}
],
"shortcuts": [
{
Expand Down
3 changes: 2 additions & 1 deletion src/Snippetica.CodeGeneration.Metadata/SnippeticaMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public static SnippeticaMetadata Load(string filePath, string sourcePath)
{
WriteIndented = true,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
Converters = { new JsonStringEnumConverter(), }
Converters = { new JsonStringEnumConverter() },
ReadCommentHandling = JsonCommentHandling.Skip,
});

var metadata = new SnippeticaMetadata()
Expand Down
8 changes: 0 additions & 8 deletions src/Snippetica.VisualStudio.Vsix.Dev/regedit.pkgdef
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,3 @@
[$RootKey$\Languages\CodeExpansions\C/C++\Paths]
"Snippetica.Cpp.Dev" = "$PackageFolder$\Snippetica.Cpp.Dev"

// HTML
[$RootKey$\Languages\CodeExpansions\HTML\Paths]
"Snippetica.Html.Dev" = "$PackageFolder$\Snippetica.Html.Dev"

// XAML
[$RootKey$\Languages\CodeExpansions\XAML\Paths]
"Snippetica.Xaml.Dev" = "$PackageFolder$\Snippetica.Xaml.Dev"

5 changes: 1 addition & 4 deletions src/Snippetica.VisualStudio.Vsix/Overview.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Introduction

A collection of snippets for C\#, C\+\+, HTML, VB and other languages\.
A collection of snippets for C\#, C\+\+, and VB\.

# Languages

- [C#](https://josefpihrt.github.io/docs/snippetica/vs/csharp)
- [Visual Basic](https://josefpihrt.github.io/docs/snippetica/vs/vb)
- [C++](https://josefpihrt.github.io/docs/snippetica/vs/cpp)
- [HTML](https://josefpihrt.github.io/docs/snippetica/vs/html)
- [XAML](https://josefpihrt.github.io/docs/snippetica/vs/xaml)
- [XML](https://josefpihrt.github.io/docs/snippetica/vs/xml)
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<TargetFrameworkProfile />
<FileUpgradeFlags></FileUpgradeFlags>
<UpgradeBackupLocation></UpgradeBackupLocation>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>14.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down Expand Up @@ -50,7 +52,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>
</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand All @@ -60,7 +63,8 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>
</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
Expand All @@ -81,6 +85,7 @@
<Content Include="../../images/snippetica-logo-large.png" Link="snippetica-logo-large.png">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<None Include="manifest.json" />
<None Include="Overview.md" />
<None Include="Snippetica.VisualStudio.snk" />
<None Include="source.extension.vsixmanifest">
Expand Down
14 changes: 0 additions & 14 deletions src/Snippetica.VisualStudio.Vsix/regedit.pkgdef
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,3 @@
[$RootKey$\Languages\CodeExpansions\C/C++\Paths]
"Snippetica.Cpp" = "$PackageFolder$\Snippetica.Cpp"

// HTML
[$RootKey$\Languages\CodeExpansions\HTML\Paths]
"Snippetica.Html" = "$PackageFolder$\Snippetica.Html"

// XAML
[$RootKey$\Languages\CodeExpansions\XAML\Paths]
"Snippetica.Xaml" = "$PackageFolder$\Snippetica.Xaml"

// XML
[$RootKey$\Languages\CodeExpansions\XML\Paths]
"Snippetica.Xml" = "$PackageFolder$\Snippetica.Xml"
[$RootKey$\Languages\CodeExpansions\XML\Paths]
"Snippetica.Xml.CodeSnippet" = "$PackageFolder$\Snippetica.Xml.CodeSnippet"

0 comments on commit 4909e26

Please sign in to comment.