solidsloth / dotnet-gitignore Goto Github PK
View Code? Open in Web Editor NEWA dotnet extension for creating a Visual Studio .gitignore file.
License: MIT License
A dotnet extension for creating a Visual Studio .gitignore file.
License: MIT License
I don't currently have a Mac OS machine to run this on, but would like to verify it.
This would only be useful after #3 is finished. This would allow searching for available templates which would search the GitHub repo.
dotnet gitignore list
# or
dotnet gitignore list M*
Right now the cache is only used for offline use. A new file is downloaded every time if internet is available. It might be more efficient to only download a new version if the cached file is of a certain age. Adding additional commands would make this more useful since you could clean the cache or force update the cache.
It would be nice to add the ability to specify a template, rather than only allowing the VisualStudio.gitignore
.
Example:
dotnet gitignore --template "C++"
# or
dotnet gitignore -t "C++.gitignore"
The application data directory is null on linux, so the cache is placed in the current directory.
When file is downloaded from GitHub it contains Linux line-endings LF. On Windows platform it may be more appropriate to convert file to Windows line-ending CRLF. Actually with tool's append option the conversion takes place. Therefore append and not-append options do not have same behavior.
Suggestion
Convert line-endings in downloaded gitignore file to Environment.NewLine. Or simply append lines to empty file.
Optionally disable this behavior with option in case someone uses weird Git line-endings configuration.
Tool should add also .gitattributes file with line-ending configuration to repository. For beginning the template from Visual Studio can be used. I don't know about better source.
try execute:
>>> dotnet gitignore
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.1.0' was not found.
- The following frameworks were found:
3.0.0 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The .NET Core frameworks can be found at:
- https://aka.ms/dotnet-download
list of available sdks:
>>> dotnet --list-sdks
3.0.100 [/usr/local/share/dotnet/sdk]
list of available runtimes:
>>> dotnet --list-runtimes
Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
os info:
>>> system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.15.1 (19B88)
Kernel Version: Darwin 19.0.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: _______________________
User Name: ________________ (__________________)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 1 day 4:49
This is only useful after #3 is complete. This would allow for setting a custom url for a template, or override the default template url. The custom urls would be searched first, and if not found the default url would be used.
dotnet gitignore template set VisualStudio https://urltofile.com/VisualStudio.gitignore
# or
dotnet gitignore template set VisualStudio.gitignore https://urltofile.com/VisualStudio.gitignore
dotnet gitignore template remove VisualStudio
# or
dotnet gitignore template remove VisualStudio.gitignore
dotnet gitignore template clear
It would be nice to be able to clear the local cache or choose not to cache.
dotnet cache clean # removes cached files
dotnet gitignore --no-cache
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.