Skip to content

Commit

Permalink
Merge pull request SLaks#8 from kasper3/master
Browse files Browse the repository at this point in the history
Upgrade to new csproj format
  • Loading branch information
SLaks authored Feb 4, 2018
2 parents 0e6380a + 0443599 commit 5a5bd62
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 134 deletions.
20 changes: 20 additions & 0 deletions Minimatch.Tests/Minimatch.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>Minimatch.Tests</AssemblyName>
<PackageId>Minimatch.Tests</PackageId>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Minimatch\Minimatch.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.2.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.2.0" />
</ItemGroup>

</Project>
25 changes: 0 additions & 25 deletions Minimatch.Tests/Minimatch.Tests.xproj

This file was deleted.

15 changes: 0 additions & 15 deletions Minimatch.Tests/project.fragment.lock.json

This file was deleted.

31 changes: 0 additions & 31 deletions Minimatch.Tests/project.json

This file was deleted.

26 changes: 13 additions & 13 deletions Minimatch.sln
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio 15
VisualStudioVersion = 15.0.27130.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DECF29EB-8A8D-4CAA-832B-21AF71AF805F}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Minimatch.Tests", "Minimatch.Tests\Minimatch.Tests.xproj", "{C073B66D-A2C3-4598-A781-8F056A1162C4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Minimatch", "Minimatch\Minimatch.csproj", "{71AEAC40-89F9-4AB3-BC8E-3D0933C2A30E}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Minimatch", "Minimatch\Minimatch.xproj", "{635A2676-3A9D-4836-A9F2-7966C3B0A7EB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556") = "Minimatch.Tests", "Minimatch.Tests\Minimatch.Tests.csproj", "{0ABF7936-3729-43E6-9E52-4636D0C58D5F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C073B66D-A2C3-4598-A781-8F056A1162C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C073B66D-A2C3-4598-A781-8F056A1162C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C073B66D-A2C3-4598-A781-8F056A1162C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C073B66D-A2C3-4598-A781-8F056A1162C4}.Release|Any CPU.Build.0 = Release|Any CPU
{635A2676-3A9D-4836-A9F2-7966C3B0A7EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{635A2676-3A9D-4836-A9F2-7966C3B0A7EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{635A2676-3A9D-4836-A9F2-7966C3B0A7EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{635A2676-3A9D-4836-A9F2-7966C3B0A7EB}.Release|Any CPU.Build.0 = Release|Any CPU
{71AEAC40-89F9-4AB3-BC8E-3D0933C2A30E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71AEAC40-89F9-4AB3-BC8E-3D0933C2A30E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71AEAC40-89F9-4AB3-BC8E-3D0933C2A30E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71AEAC40-89F9-4AB3-BC8E-3D0933C2A30E}.Release|Any CPU.Build.0 = Release|Any CPU
{0ABF7936-3729-43E6-9E52-4636D0C58D5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0ABF7936-3729-43E6-9E52-4636D0C58D5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0ABF7936-3729-43E6-9E52-4636D0C58D5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0ABF7936-3729-43E6-9E52-4636D0C58D5F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
22 changes: 22 additions & 0 deletions Minimatch/Minimatch.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>A C# glob matcher</Description>
<AssemblyTitle>Minimatch</AssemblyTitle>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>SLaks</Authors>
<TargetFramework>netstandard1.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Minimatch</AssemblyName>
<AssemblyOriginatorKeyFile>Minimatch.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>Minimatch</PackageId>
<PackageTags>strings;glob;search;files;wildcards;patterns</PackageTags>
<PackageReleaseNotes>Repackaged with .Net Platform Standard</PackageReleaseNotes>
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/SLaks/Minimatch/</RepositoryUrl>
</PropertyGroup>

</Project>
19 changes: 0 additions & 19 deletions Minimatch/Minimatch.xproj

This file was deleted.

25 changes: 0 additions & 25 deletions Minimatch/project.json

This file was deleted.

15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#Minimatch
# Minimatch
A minimal matching utility.

This is a port of Node.js' [minimatch](https://github.com/isaacs/minimatch).

##Usage
## Usage
First, install [from NuGet](https://www.nuget.org/packages/Minimatch/):

```
```powershell
dotnet-cli> dotnet add package Minimatch
nuget> nuget install Minimatch
PM> Install-Package Minimatch
packet> paket add Minimatch
```

Just parse the pattern into a `Minimatcher` instance, then call the `IsMatch` function to check whether an input matches it. You can also use the `Filter()` convenience method to filter a list of paths and find those that match the pattern.
Expand All @@ -24,13 +27,13 @@ var matchingPaths = mm.Filter(allPaths);

Minimatch also has `static` versions of these methods that take a pattern a string. However, these methods will re-parse the pattern on every invocation, making them slower.

##On Windows-style paths
## On Windows-style paths
Minimatch's syntax was designed for Linux-style paths (with forward slashes only). In particular, it uses the backslash as an escape character, so it cannot simply accept Windows-style paths.
My C# version preserves this behavior.

To suppress this, and allow both backslashes and forward slashes as path separators (in patterns or input), set the `AllowWindowsPaths` option:

```cs
```csharp
var mm = new Minimatcher(searchPattern, new Options { AllowWindowsPaths = true });
```

Expand Down Expand Up @@ -92,5 +95,5 @@ Quoting the original documentation:
> **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
> checked for validity. Since those two are valid, matching proceeds.
#License
# License
[MIT](http://opensource.org/licenses/MIT)

0 comments on commit 5a5bd62

Please sign in to comment.