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
assets/manifest.jsonfile defines the left-hand navigation hierarchy of the app:
- An entry with a
samplesarray defines a nested menu.
- An entry with a
pathstring defines a sample at the path's location (omit the
.jsfrom the filename)
- Optionally, a
cssstring 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.
- An entry with a
- A sample must consist of one .js file containing a top-level kind of the same name as the file. For example
ButtonSample.jsshould contain (at least) a
ButtonSamplekind, 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
cssparameter 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
assets/manifest.jsonto point to a root directory containing un-minified versions of the
libdirectories (containing at least the samples).
The sampler can take additional parameters on the URL, added as arguments after a '?' character.
This provides one or more additional paths from which to load samples. The path should be to a manifest.json hosted in the new collection's folder. Sampler will also try to load a package.js from the same folder to pull in the sample source. You can use this when testing a library to load its samples into the system without having to add them to the sampler source. These paths are saved into local storage so they don't have to be referenced in the future.
This sets a path to load sample source from instead of the default manifest. This paths is saved into local storage so it doesn't have to be referenced in the future.
This enables test mode, where you can go through each sample one-by-one. It also lets you modify the addSamples and sourcePath directly via a settings GUI and gives access to BrowserScope test recording.
This clears previous paramameters stored in local storage.
Copyright and License Information
Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
Copyright (c) 2012-2014 LG Electronics
Unless otherwise specified or set forth in the NOTICE file, all content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.