Enyo 2 Sampler
JavaScript Objective-C HTML Shell CSS ApacheConf Other
Switch branches/tags
pilot-12 pilot-11 pilot-10 pilot-9 pilot-8 pilot-7 pilot-6 pilot-5 pilot-4 pilot-3 pilot-2 pilot-1 jenkins-enyo-rc-release-11 jenkins-enyo-github-nightly-1159 jenkins-enyo-github-nightly-1158 jenkins-enyo-github-nightly-1157 jenkins-enyo-github-nightly-1156 jenkins-enyo-github-nightly-1155 jenkins-enyo-github-nightly-1154 jenkins-enyo-github-nightly-1153 jenkins-enyo-github-nightly-1152 jenkins-enyo-github-nightly-1151 jenkins-enyo-github-nightly-1150 jenkins-enyo-github-nightly-1149 jenkins-enyo-github-nightly-1148 jenkins-enyo-github-nightly-1147 jenkins-enyo-github-nightly-1146 jenkins-enyo-github-nightly-1145 jenkins-enyo-github-nightly-1144 jenkins-enyo-github-nightly-1143 jenkins-enyo-github-nightly-1142 jenkins-enyo-github-nightly-1141 jenkins-enyo-github-nightly-1140 jenkins-enyo-github-nightly-1139 jenkins-enyo-github-nightly-1138 jenkins-enyo-github-nightly-1137 jenkins-enyo-github-nightly-1136 jenkins-enyo-github-nightly-1135 jenkins-enyo-github-nightly-1134 jenkins-enyo-github-nightly-1133 jenkins-enyo-github-nightly-1132 jenkins-enyo-github-nightly-1131 jenkins-enyo-github-nightly-1130 jenkins-enyo-github-nightly-1129 jenkins-enyo-github-nightly-1128 jenkins-enyo-github-nightly-1127 jenkins-enyo-github-nightly-1126 jenkins-enyo-github-nightly-1125 jenkins-enyo-github-nightly-1124 jenkins-enyo-github-nightly-1123 jenkins-enyo-github-nightly-1121 jenkins-enyo-github-nightly-1120 jenkins-enyo-github-nightly-1119 jenkins-enyo-github-nightly-1118 jenkins-enyo-github-nightly-1116 jenkins-enyo-github-nightly-1115 jenkins-enyo-github-nightly-1114 jenkins-enyo-github-nightly-1113 jenkins-enyo-github-nightly-1112 jenkins-enyo-github-nightly-1111 jenkins-enyo-github-nightly-1110 jenkins-enyo-github-nightly-1109 jenkins-enyo-github-nightly-1108 jenkins-enyo-github-nightly-1107 jenkins-enyo-github-nightly-1106 jenkins-enyo-github-nightly-1105 jenkins-enyo-github-nightly-1104 jenkins-enyo-github-nightly-1103 jenkins-enyo-github-nightly-1102 jenkins-enyo-github-nightly-1101 jenkins-enyo-github-nightly-1100 jenkins-enyo-github-nightly-1099 jenkins-enyo-github-nightly-1098 jenkins-enyo-github-nightly-1097 jenkins-enyo-github-nightly-1096 jenkins-enyo-github-nightly-1095 jenkins-enyo-github-nightly-1094 jenkins-enyo-github-nightly-1093 jenkins-enyo-github-nightly-1092 jenkins-enyo-github-nightly-1091 jenkins-enyo-github-nightly-1090 jenkins-enyo-github-nightly-1089 jenkins-enyo-github-nightly-1088 jenkins-enyo-github-nightly-1087 jenkins-enyo-github-nightly-1086 jenkins-enyo-github-nightly-1085 jenkins-enyo-github-nightly-1084 jenkins-enyo-github-nightly-1083 jenkins-enyo-github-nightly-1082 jenkins-enyo-github-nightly-1081 jenkins-enyo-github-nightly-1080 jenkins-enyo-github-nightly-1079 jenkins-enyo-github-nightly-1078 jenkins-enyo-github-nightly-1077 jenkins-enyo-github-nightly-1076 jenkins-enyo-github-nightly-1075 jenkins-enyo-github-nightly-1074 jenkins-enyo-github-nightly-1073 jenkins-enyo-github-nightly-1072 jenkins-enyo-github-nightly-1071
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
enyo @ b2488a3
lib
projects
source
tasks Gruntfile support for deploy, clean, and http server Dec 10, 2014
tools
.gitignore
.gitmodules
.htaccess
.jshintignore
.jshintrc
.travis.yml Add .jshintrc and .jshintignore files for sampler Jun 5, 2013
Gruntfile.js
LICENSE-2.0.txt
README.md Update README.md with copyright and license info Mar 7, 2014
appinfo.json
consoleShim.js
debug.html
deploy.json ENYO-287 Removed reference to layout/flex Oct 4, 2014
disableEnyoDom.js Add .jshintrc and .jshintignore files for sampler Jun 5, 2013
icon.png
iframe.html
index.html
largeIcon.png
manifest.webapp
package.js
package.json
speedTest.html
speedTest.js Remove flex from speedTest.js Jun 18, 2013
speedTestDebug.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).

URL Parameters

The sampler can take additional parameters on the URL, added as arguments after a '?' character.

addSamples=[,...]

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.

sourcePath=

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.

extras=1

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.

reset=1

This clears previous paramameters stored in local storage.

Benchmarking

There are a couple of alternate index.html files that will load all of the standard samples and run them as a JavaScript benchmark. speedTest.html will load the minified source, while speedTestDebug.html loads the full source from the trees. Output of benchmark results goes to the debug console.

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

http://www.apache.org/licenses/LICENSE-2.0

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.