Generator which creates the basic setup for files needed to support a code sample (for use with Yeoman).

Usage no npm install needed!

<script type="module">
  import generatorInfragisticsSample from '';


Infragistics Code Sample Generator

This generator includes files you'll find helpful in getting started publishing a sample on GitHub. The resources created by the generator include:

  1. A disclosure which itemizes the licenses for each library used in your sample. While the sample you make available on GitHub may be an open license libraries like Ignite UI and others may be more restrictive so we want to document that fact clearly.

  2. This is a stock MIT license ready for you to include in your repository. If this license is inappropriate for your needs make sure you overwrite this file with the correct license.

  3. This file acts as the base file you will use in your repository. This file includes some basic structure and content that you may find useful as you create your repository. Feel free to remove any of the stock text or structure as you see fit. This is here as a time-saving tool for you! You'll want to rename this file to and begin your work from there.

  4. index.html: The index.html file is stubbed out with references to the trial version of Ignite UI and CDN references to libraries like jQuery, Modernizr, Bootstrap and Font Awesome. There is also a meta name="viewport" tag in the head. If you do not want your sample to be responsive then you might want to remove that element.

Getting Started

To use, you have to first install Yeoman. If you don't have it installed yet, run:

npm install -g yo

Installing the Infragistics Sample Generator

Just run:

npm install -g generator-infragistics-sample

Using the Infragistics Sample Generator

In the directory that you want to create your sample, run:

yo infragistics-sample


As you are building your sample there are a few tips that may help you as you publish your repository on GitHub.

Using Raw Files

Whether you are attempting to directly access an image loaded into your repository or if you want to run the code in your sample directly off GitHub - you need to be aware of how to use raw GitHub files.

Once you have the URL of a file that is pushed to GitHub, for instance:

To get to the raw file (or in this case a file you can run directly in the browser) then you need to change the domain to and remove the /blob segment from the URL:

Note: You'll often want to change the protocol from https to http.

Data URIs for Images

In an effort to make your code more portable you may want to consider using data URIs instead of images. You can use these in CSS or even as the value for the src attribute of an img element. Generating code for data URIs is easy. For an example of how you may want to use a data URI check out the sample data in this sample.