Git Product home page Git Product logo

gitextensions.plugintemplate's Introduction

GitExtensions Plugin Template

An example/empty repository for building a GitExtensions plugin that can be installed using GitExtensions.PluginManager.

The package is going to be published on NuGet.org feed.

Files to keep an eye on

Nuspec

  • Place all content under lib folder. Custom nested folders are supported and path is preserved.
  • Add dependency on "virtual" package GitExtensions.Extensibility and target version [3.0,3.1) *.
  • Real package dependencies are not supported, so everything should be packed with the plugin.
  • Keep in mind that sharing common libraries can be cumbersome as these must match across all plugins and also Git Extensions itself. So my current recommendation is not to do so.

* This is just my own eperience. Git Extensions follow SemVer, but it's public plugin API is not so rich that sometimes you need to kind a hack it using APIs that are not ment to be public. For these reasons its better to check compatibility with every single feature update.

Csproj

  • I'm using powershell script to download a selected version of Git Extensions from GitHub releases. This script runs before every build and checks if Git Extensions binaries are donwloaded.
  • CSproj references selected binaries from the downloaded Git Extensions.
  • After build a newly created binaries of the plugin is copied to Git Extensions plugins directory.
  • F5 is setup to start downloaded GitExtensions.exe for easy debugging.

Plugin.cs

  • Nothing special, but ordinary Git Extensions plugin :-)

Good practices

Here are some advices that we learned over the time.

Always target single Git Extensions version

Until Git Extensions provides a stable API for developing plugins, most of the plugins must use un stable API that may change in every Git Extensions version. So it is good to always target single version when defining a package reference on GitExtensions.Extensibility.

Follow semantic versioning

Primarily when target Git Extensions version change. It gives you the options for possible patches of previous versions.

Icons

Some icons by Yusuke Kamiyamane.

gitextensions.plugintemplate's People

Contributors

maraf avatar mast-eu avatar pmiossec avatar russkie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitextensions.plugintemplate's Issues

Question about script

Someone, please tell me were the prebuild script is stored?
I really cant find it)))
It executes, but for my point of view it does not exists))
Like a ghost)

Template improvements

Created new issue from what @Cussa wrote in gitextensions/gitextensions#6624 (comment).

  • Most of the plugins will have some UI. So, it makes sense to have the template with some UI already.
    • In my case, I cloned the Plugin Manager, and I'm using that as a reference to create mine.
  • Most of the plugins will have some Settings. So, it makes sense to have the template with some Settings examples.
    • Again, I'm using the Plugin Manager as a model. However, as it has only one type of setting, It would be handy to have some examples.
  • It would be good to include some Script to rename the points to the plugin name.
    • When you use the template from GitHub, it generates the repo, but you have to go everywhere to rename files and folders to your plugin name. I'm thinking about some simple script that could do that easily.

Migrate the template to .NET

The template is still targeting .NET Framework, which will no longer work for Git Extensions v4+ (it's targeting .NET 6.0).

Update the template to target the .NET 6.0 (or whatever TFM is currently targeted by Git Extensions). https://github.com/gitextensions/GitExtensions.GerritPlugin may act as a good reference source.

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.