Fork me on GitHub

Contributing to RichWidgets Build Status

A JavaScript project containing standalone javascript widgets based on Bootstrap, jQuery UI and other third-party widgets, styled with LESS.

Hacking on RichWidgets

Begin by setting you your environment and making sure you can build RichWidgets as described the README.md.

Widgets are highly visual constructs, and we are more effective in developing them when we get rapid feedback as we introduce changes. Without this rapid feedback, we are like sculptors carving blindfolded!

Run the grunt dev command from the richwidgets root folder to start up a development version of the online demo with integrated live-reload. You will see this demo runnin locally at:

http://localhost:9000

As you make changes to the html, javascript, and LESS source, the source will be compiled and the demo site will be updated.

Additionally, this development version of the demo uses unminified versions of the sources making it easier to debug your widget in your browsers development tools.

The demo pages themselves use handlebars.js for templating. This allows us to keep our demo code DRY by using the same code to both run the page sample as well as display the code on the page. Handlebars is easily extensible through it's helper mechanism. If you find yourself bending over backwards to make something work, consider writing such a helper.

Publishing the demos

Publish the demos to github pages using the grunt task grunt site

Coding Style

It helps to be consistent. Here are the coding style conventions we have agreed to follow in this project. this will be updated as new discrepancies are discovered and cleaned up. Wherever possible these conventions are being monitored by jshint.

Creating a new widget

To create a new widget called "My widget", start by creating the files:

Create a demo for your widget in

The demo pages use handlebars.js, and will be added to the site navigation automatically.

Testing

Read about our approach to testing in the TESTS.md guide.