Git Product home page Git Product logo

sampler's Introduction

Enyo 2.0 Sampler

A cross-platform application for viewing Enyo 2.0 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).

sampler's People

Contributors

unwiredben avatar dfreedm avatar sugardave avatar dgreisen avatar sbcho avatar

Watchers

MM avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.