Theme Packer

box_thumb_1.pngAs much as I like power and flexibility NuGet provides to developers, I do realize that lots of people just want their packing task done fast and efficient and have no desire dig into command line. NuGet also has a little tool for building and editing packages graphically, and I’ve been using it for a while too. Unfortunately with 1.2 released last week, packages created with this tool (as well as NuGet 1.2 command line) no longer compatible with dnbegallery. Gallery built on top of several OS projects that all utilize NuGet 1.1, and upgrade will probably take a while. With all that under way, I made small utility to help me package themes for the gallery really quick, may be others would like to use it too. So here it goes.

Download and unzip file attached to the end of this post. You’ll get a folder called “ThemePacker” – move it into the same directory where your BlogEngine themes are. You should have “ThemePacker” and “themes” folder at the same level, and you need .NET 4.0 runtime installed. That’s all it takes to setup, here is how to use:

  1. Double-click “BeThemePacker.exe” located in that “ThemePacker” directory. Select folder dialog will pop up, and if your themes directory at the same level as packer application, it will be selected so you just click “ok” button. Otherwise navigate and select BE themes folder.

packer-dialog_thumb.png

  1. Pick theme you want to package and fill in all fields, content should be self-explanatory.

packer-form_thumb.png

  1. Click “create package” button and then hit any key to close command window that application will launch.

packer-cmd_thumb.png

  1. Now go look at “ThemePacker/packages” folder. There should be a file with same name as your theme and extension “.nupkg” – it is ready to be uploaded to dnbegallery.

packer-nupkg_thumb_1.png

That’s all to it. Don’t expect rich functionality, it has many limitations. For example if your theme has files outside theme’s folder they will be ignored, you can’t open and edit existing NuGet package etc. It does one thing only but it makes packaging theme really fast and easy.

themepacker.zip

About RTUR.NET

This site is all about developing web applications with focus on designing and building open source blogging solutions. Technologies include ASP.NET Core, C#, Angular, JavaScript and more.