Widget Projects

Implementing these steps will allow you to work on your widget code outside of your website. When you build in Debug mode, it will copy all files into your website. When you build in Release mode, the files will still be copied, but it will also create an Install and Source package for you to use to install this widget package on other DNN instances.

This project will likely create a DLL as well, but the build scripts will ignore them at this time.

Packages

The resulting Install and Source packages will be added to the ~/Install/Widget/ folder in your website. The source package will include all of your widget code and dependency files. The install package will also include all of the same files, but your JavaScript files will be compressed for you.

Steps to Implement

Add one folder for each of your widget projects and place the applicable project files inside of each folder.

widget-structure.png

Add the Widget.build file found in the Widgets folder to each project.

If you do not already have a project file, add the Sample-Widget-ProjectFile.csproj file to your project and rename it to reflect your widget package name. You'll find this in the Widgets folder of the starter kit.

If necessary, edit the project file for your skin in your favorite text editor to add the following lines seen below.

<ItemGroup>
	<Content Include="Widget.Build" />
</ItemGroup>
<Import Project="Widget.Build" />

widget-build.png

If this is your first time putting this project together, you'll need to Include Files in Visual Studio to make the widget folders and files show. Do this by choosing the Show All Files option, and then right-click on the respective folders and files that you want your project to have included.

Last edited Feb 9, 2014 at 9:41 PM by hismightiness, version 2