Giter Site home page Giter Site logo

jfversluis / plugin.maui.feature Goto Github PK

View Code? Open in Web Editor NEW
51.0 2.0 4.0 8.4 MB

A template repository that can be used to bootstrap your own .NET MAUI plugin

License: MIT License

C# 100.00%
android cross-platform dotnet dotnet-maui ios macos maui nuget plugin windows

plugin.maui.feature's Introduction

Plugin.Maui.Feature Template

The Plugin.Maui.Feature repository is a template repository that can be used to bootstrap your own .NET MAUI plugin project. You can use this project structure as a blueprint for your own work.

Learn how to get started with your plugin in this YouTube video.

This template contains:

  • A sample .NET MAUI app where you can demonstrate how your plugin works and test your plugin with while developing
  • The source of the plugin
  • A boilerplate README file you can use (don't forget to rename to README.md and remove this one!)
  • GitHub Actions for CI of the library and the sample app
  • GitHub Action for releasing your package to NuGet
  • A generic icon for your project, feel free to adapt and be creative!
  • A .editorconfig file to standardize the code syntax. Feel free to adapt or remove.
  • The LICENSE file with the MIT license. If you want this to be different, please change it. At the very least add your name in there!

Getting Started

  1. Create your own GitHub repository from this one by clicking the "Use this template" button and then "Create a new repository". More information in the documentation. After that, clone the repo to your local machine.

  2. Replace all occurrences of Plugin.Maui.Feature with whatever your feature or functionality will be. For instance: Plugin.Maui.ScreenBrightness or Plugin.Maui.Audio. Of course the name can be anything, but to make it more discoverable it could be a great choice to stick to this naming scheme. You can easily do this with your favorite text-editor and do a replace all on all files.

    2.1 Don't forget to also rename the files and folders on your filesystem.

  3. In the csproj file of the plugin project (under src), make sure that you replace all relevant values to your project. This means the author of this project, the description of the project, the target framework (.NET 7, 8 or something else). If you don't want to or can't support a certain platform, remove that target platform altogether.

  4. Delete this README.md file and rename README_Feature.md to README.md. Fill that README file with all the relevant details of your project.

  5. Check the LICENSE file if this reflects the license that you want to distribute your project under. At the very least add your name there and the current year we live in.

  6. Create a nice icon in the nuget.png file that will show up on nuget.org and in the NuGet manager in Visual Studio.

  7. Write your plugin code (under src) and add samples to the .NET MAUI sample app (under samples folder)

  8. Make super sure that your package won't show up as Plugin.Maui.Feature on NuGet! If one does, you owe me a drink!

  9. Publish your package to NuGet, a nice guide to do that can be found here. Also see Publish to NuGet below.

  10. Enjoy life as a .NET MAUI plugin author! โœจ

As an example of all of this you can have a look at:

Publish to NuGet

If you want to publish your package to NuGet, you totally can! Included in this template are a couple of GitHub Actions. One of them goes of when you create a new tag with this pattern: v1.0.0 or v1.0.0-preview1. Obviously the 1.0.0 part can be determined by you as you see fit, as long as you follow the pattern of 3 integers separated by dots.

You will also want to set a secret for this repository which contains your NuGet API key. Follow the documentation on that here, and add a secret with the key NUGET_API_KEY and value of your NuGet API key. The API key should be authorized to push a NuGet package with the given identifier.

From there, after creating a GitHub release your plugin will be automatically released on NuGet!

plugin.maui.feature's People

Contributors

jfversluis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

plugin.maui.feature's Issues

Question about plugins

Hello and congratulations for this great contribution that I was waiting for something like this for a long time, but I need if you could clarify a question about this template... In the .Net Framework there was something called managed extensibility framework (MFE). When switching to .Net Core, this didn't exist... My question is, does your template do the same function as MEF? Thank you very much for your work.

Add section to Plugin README for supported platforms

For the plugin README (README_Feature.md) it might be a nice touch to add a section/table to show the supported platforms that authors can fill in. That will make it more clear what platforms are actually supported by the plugin that is created.

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.