Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.
/ widget-examples Public archive

Contains the common code for the GoInstant widget examples.. This repo will no longer be updated. GoInstant will be discontinued as of August 31, 2014. Read our blog for more details.

Notifications You must be signed in to change notification settings

goinstant/widget-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Widget Examples

Contains the common code for the GoInstant widget examples.

example.html.example is the template that should be used for creating new examples. This will setup everything in the example page except for the example specific code and expected results.

Usage

To create a new example copy the template example.html.example to a new HTML file located at <widget-root>/examples and fill out the following:

/** Initialize widget(s) for example here
 *
 * Also include any example specific code needed to ensure the widget
 * behaves as expected.
 */
// Replace 'Widget Name' with the widget being tested.
// Replace 'example description' with a short description of this example.
var config = {
  name: 'Widget Name',
  desc: 'example description',
  test: widgetTest
};
<ul>
  <!-- Place expected results here -->
  <li>Expected <strong>results</strong> go here.</li>
</ul>

The template assumes the following:

There is a config file located at ../config/config.js and when included will create a config object on the window. This object should have the following structure:

window.config = {
  connectUrl: 'https://goinstant.net/YOUR_ACCOUNT/YOUR_APP',
  room: 'goinstant-widgets-examples'
};

This repo was installed via npm install and the template can find the root of this repo at ../node_modules/widget-examples.

lodash was installed via npm install and can be found at ../node_modules/lodash

About

Contains the common code for the GoInstant widget examples.. This repo will no longer be updated. GoInstant will be discontinued as of August 31, 2014. Read our blog for more details.

Resources

Stars

Watchers

Forks

Packages