WIP - no love for minified.js anymore :(

This commit is contained in:
Keegan
2016-01-28 20:20:43 -08:00
parent 9da9edbb78
commit 04f2f9dabd
7 changed files with 62 additions and 27 deletions
+11 -10
View File
@@ -5,17 +5,18 @@ module.exports = function() {
/** @type {ClayConfig} */
var Clay = window.Clay = this;
Clay.getItemByAppKey('cool_stuff').on('change', function() {
if (this.get()) {
Clay.getItemByAppKey('background').enable();
} else {
Clay.getItemByAppKey('background').disable();
}
Clay.on(Clay.EVENTS.BEFORE_BUILD, function() {
console.debug('KEEGAN: BEFORE_BUILD', this);
});
Clay.on('test', function() {
console.debug('KEEGAN: this', this);
Clay.on(Clay.EVENTS.AFTER_BUILD, function() {
console.debug('KEEGAN: AFTER_BUILD', this);
Clay.getItemByAppKey('cool_stuff').on('change', function() {
if (this.get()) {
Clay.getItemByAppKey('background').enable();
} else {
Clay.getItemByAppKey('background').disable();
}
});
});
Clay.trigger('test');
};
+1 -1
View File
@@ -5,5 +5,5 @@ window.clayConfig = require('./config.js');
window.claySettings = {};
window.customFn = require('./custom-fn.js');
var platform = window.navigator.userAgent.match('Android') ? 'android' : 'ios';
var platform = window.navigator.userAgent.match(/Android/) ? 'android' : 'ios';
document.documentElement.classList.add('platform-' + platform);