Skip to content

Packaging Plugins & Themes

nairdo edited this page Jan 2, 2013 · 10 revisions

For now, you can package your theme or plugin using the NuGet Package Explorer.

Packaging a Theme

  1. Start the NuGet Package Explorer(NPE) and select 'Create a new package'.
  2. Edit the Metadata and fill out
  • the permanent Id for your package
  • Version (please use Semantic Versioning)
  • the Icon Url should be a 128x128 jpg/png thumbnail representing your theme
  • your Author username, a Description and one or two appropriate Tags (use theme since it's a theme)
  1. From the menu, select Content to add a 'Content Folder' and...
  1. Save the Metadata (.nuspec) and the package (.nupkg) files
  2. Publish the theme package file at quarry.rockchms.com
  • You will need your publish API key if you want to use the NuGet Package Explorer to publish directly to quarry.rockchms.com. Create an account on the quarry server and fetch your key from your profile page.

Attachments/Packaging-plugins-and-themes/s_Your-API-Key.png

NOTE: If you create a new version of your package that you intend on publishing, you MUST increment the version number as specified in the Semantic Versioning standard.

Packaging a Data-less Plugin

A plugin is simply a collection of one or more blocks with corresponding image, css, and JavaScript assets. There are two types of Plugins: one that has "data" (think SQL) associated with it and the other which does not. Data-less plugins can be shared today using Rock's Plugin Manager however plugins which need some persisted SQL data are not quite ready for use with Rock's Plugin Manager.

We're working on a convention that will provide you (the plugin developer) a mechanism to automatically execute your SQL on install and upgrade, but we're just not ready yet. The convention will probably include a "Migrations" folder with a <version> subfolder for each version of the plugin. Example Migrations\1.0.0\up.sql and Migrations\1.0.0\down.sql Where the up.sql will be called when upgrading to that version and the down.sql will be called when removing that version.

As it turns out, creating a data-less Plugin package is nearly identical to creating a Rock Theme. The only real difference is the Icon Url would be a graphic representing your plugin (of course!) and instead of a Themes folder you will create a Plugins folder under the content folder from step 3 above. Under the Plugins folder you will create a custom folder to hold your blocks, assets, etc.

Clone this wiki locally