Code Monkey home page Code Monkey logo

solrevdev / seedfolder Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 65 KB

This repository contains the source code for a .NET Core Global Tool I developed, as detailed in my blog post. The tool automates the creation of a specified folder and populates it with essential dotfiles. This process effectively seeds the folder, preparing it for Git and development use.

Home Page: https://solrevdev.com/2020/10/05/creating-a.net-core-global-tool.html

License: MIT License

C# 71.37% PowerShell 16.44% Shell 12.19%
dotnet dotnetcore dotnetcore3-1 dotnet-global-tool dotnet-global-tools csharp git-tools dotfiles

seedfolder's Introduction

Solrevdev.SeedFolder

GitHub last commit CI Twitter Follow

                     _  __       _     _
  ___  ___  ___  __| |/ _| ___ | | __| | ___ _ __
 / __|/ _ \/ _ \/ _` | |_ / _ \| |/ _` |/ _ \ '__|
 \__ \  __/  __/ (_| |  _| (_) | | (_| |  __/ |
 |___/\___|\___|\__,_|_|  \___/|_|\__,_|\___|_|

Overview

This is a .NET Core Global Tool that will create a folder named after either the first argument passed to it or if no argument is passed it will ask you for the folder name. It will then copy some default standard dotfiles over.

For example:

seedfolder
dotnet run --project src/solrevdev.seedfolder.csproj
▲   Do you want to prefix the folder with the date? [Y/n] y
▲   What do you want the folder to be named? temp
‍▲   Creating the directory 2020-12-10_temp
‍▲   Copying .dockerignore to 2020-12-10_temp/.dockerignore
‍▲   Copying .editorconfig to 2020-12-10_temp/.editorconfig
‍▲   Copying .gitattributes to 2020-12-10_temp/.gitattributes
‍▲   Copying .gitignore to 2020-12-10_temp/.gitignore
‍▲   Copying .prettierignore to 2020-12-10_temp/.prettierignore
‍▲   Copying .prettierrc to 2020-12-10_temp/.prettierrc
‍▲   Copying omnisharp.json to 2020-12-10_temp/omnisharp.json
▲   Done!

seedfolder
dotnet run --project src/solrevdev.seedfolder.csproj
▲   Do you want to prefix the folder with the date? [Y/n] n
▲   What do you want the folder to be named? temp
‍▲   Creating the directory temp
‍▲   Copying .dockerignore to temp/.dockerignore
‍▲   Copying .editorconfig to temp/.editorconfig
‍▲   Copying .gitattributes to temp/.gitattributes
‍▲   Copying .gitignore to temp/.gitignore
‍▲   Copying .prettierignore to temp/.prettierignore
‍▲   Copying .prettierrc to temp/.prettierrc
‍▲   Copying omnisharp.json to temp/omnisharp.json
▲   Done!

seedfolder temp
dotnet run --project src/solrevdev.seedfolder.csproj temp
▲   Found 1 params to process.
‍▲   Creating the directory temp
‍▲   Copying .dockerignore to temp/.dockerignore
‍▲   Copying .editorconfig to temp/.editorconfig
‍▲   Copying .gitattributes to temp/.gitattributes
‍▲   Copying .gitignore to temp/.gitignore
‍▲   Copying .prettierignore to temp/.prettierignore
‍▲   Copying .prettierrc to temp/.prettierrc
‍▲   Copying omnisharp.json to temp/omnisharp.json
▲   Done!

It will also copy the following dotfiles from the src/Data folder over:

  • .dockerignore
  • .editorconfig
  • .gitattributes
  • .gitignore
  • .prettierignore
  • .prettierrc

Installation

Locally without publishing it on NuGet

dotnet pack
dotnet tool install --global --add-source ./nupkg solrevdev.seedfolder

Normally via NuGet

dotnet tool install --global solrevdev.seedfolder

To uninstall

dotnet tool uninstall -g solrevdev.seedfolder

Publish to Nuget

Uses a GitHub secret to store a NUGET_API_KEY API Key created over at NuGet in order to build and deploy via GitHub actions to NuGet.

When you commit bump the version in the csproj file

<Version>1.0.1</Version>

seedfolder's People

Contributors

solrevdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

seedfolder's Issues

Replace rohith/publish-nuget with native nuget publish commands

I have a ci.yml Github Action which still runs successfully but..

  1. The github action gives me a warning in Github Actions:
The following actions uses node12 which is deprecated and will be forced to run on node16: rohith/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
  1. Viewing the project on github redirects me to here : https://github.com/brandedoutcast/publish-nuget and suggests that
"THIS REPOSITORY IS ARCHIVED 😴 It's time consuming to add features & stay in sync with changes in dotnet world so no new issues / PRs will be accepted You can replicate the functionality of this action & much more by using the offical tools like dotnet CLI or GitHub CLI etc.,"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.