Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Enyo 2.0 Sampler app

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 assets
Octocat-spinner-32 enyo @ aa7a7f9
Octocat-spinner-32 lib
Octocat-spinner-32 projects
Octocat-spinner-32 source
Octocat-spinner-32 tools
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 .htaccess
Octocat-spinner-32 README.md
Octocat-spinner-32 debug.html
Octocat-spinner-32 icon.png
Octocat-spinner-32 index.html
README.md

Enyo 2 Sampler

A cross-platform application for viewing Enyo 2 samples from all its various libraries.

For the most recent released version, see the Enyo JS website. The latest nightly build is also available at http://nightly.enyojs.com/latest/sampler/debug.html.

The app allows navigation through each library's samples. Each sample is designed to be usable across all form factors, as a kind that can be rendered within the Sampler app, as well as standalone via the accompanying .html file.

You can inspect the current sample through the console via window.sample.

Since the app AJAX's in the JavaScript and CSS source files for the viewer, a few simple conventions must be followed to add new samples to the app:

  • The assets/manifest.json file defines the left-hand navigation hierarchy of the app:
    • An entry with a samples array defines a nested menu.
    • An entry with a path string defines a sample at the path's location (omit the .js from the filename)
    • Optionally, a css string defines the base filename of a shared CSS file instead of defaulting to use a CSS file with the same name as the .js file.
  • A sample must consist of one .js file containing a top-level kind of the same name as the file. For example ButtonSample.js should contain (at least) a ButtonSample kind, which is the kind rendered into the right-hand panel of the app.
  • By default, samples should define their css in a file with the same name as the kind (for example, ButtonSample.css). However, by specifying the optional css parameter in the manifest, more than one smaple may share the same CSS file.
  • Using this scheme, more than one sample .js file may be situated in the same folder, where they all share a sample.css file.
  • When deploying the app, change the sourcePath variable in assets/manifest.json to point to a root directory containing un-minified versions of the enyo and lib directories (containing at least the samples).
Something went wrong with that request. Please try again.