Creating gists for the catalog app

Introduction

Note: this article is written for bridge developers only. Creating and using gists for application developers that use the bridge is described here

We recently added the feature to run each example of each Aurelia component in the Aurelia KendoUI bridge catalog app, using the Aurelia GistRun tool:

Image 1 This GistRun is invoked by a click on the **RUN** button on the `Autocomplete` page of the catalog app:

The rest of this article demonstrates the process of adding the `**RUN**` button to the **[combobox basic use](http://aurelia-ui-toolkits.github.io/demo-kendo/#/samples/combobox/)** page. *** ### Step 1 Prepare the file **[registry.json](https://github.com/aurelia-ui-toolkits/aurelia-kendoui-bridge/blob/master/sample/src/samples/combobox/registry.json)** by adding the basic definition of the `gist` to be used. ```javascript { "title": "ComboBox", "documentation": "http://docs.telerik.com/kendo-ui/api/javascript/ui/combobox", "samples": { "basic-use": { "route": ["", "basic-use"], "gist": "https://gist.run/?id=xxx" }, "api": { "title": "API", "gist": "https://gist.run/?id=xxx" }, "cascading-combobox": { "gist": "https://gist.run/?id=xxx" }, "customizing-templates": { "gist": "https://gist.run/?id=xxx" }, "grouping": { "gist": "https://gist.run/?id=xxx" }, "server-filtering": { "gist": "https://gist.run/?id=xxx" }, "virtualization": { "gist": "https://gist.run/?id=xxx" }, "events": { "gist": "https://gist.run/?id=xxx" } } } ``` *** *** ### Step 2 Create the gists for each of the sample used on this page of the catalog app To avoid the repetition, we will show the creation of just the **ComboBox basic use** gist. ##### Step 2.1 - create a new Gist Go to https://gist.github.com/ to create a new, empty **Gist**

Image 2

Step 2.2 - populate the Gist

Drag the four prepared files shown below

Image 3

and drop them on top of the GitHub Gist page which was empty so far, shown on Image 2. Note that this "drag and drop" use is the best workaround for the current lack of GistRun tool's to support the import of the whole project for the gist.

Now, we have these files added to the the gist:

Image 4

Note that we also added the Gist title (top of the gist window) "ComoboBox: basic use".

At this point we need to explain what are these four "prebuilt" files we just added to the gist:

index.html

This is the standard "beginning" of any Aurelia application - with a very big difference, caused by the line:

which tells the GistRun tool to fetch the complete, bundled Aurelia runtime modules set from the https://rawgit.com server. The actual bundle was prepared by Aurelia-UI-Toolkits team and is being maintained here

main.js

This is the standard Aurelia configuration function which requires the presence of the Aurelia-KendoUI bridge. That presence is of course ensured by specific content of the aurelia-kendoui-bundles repository

app.html - the HTML tab from Code Preview on this page

app.js - the Javascript tab from Code Preview on this page

Step 2.3 - Save the Gist

Click on the Save Gist as public or Update public gist

Image 1

Lastly copy the gist ID from the gist page URL

Image 2

and paste it in the registry.json entry for the ComboBox: basic use example.

Image 3

Last updated