mirror of
https://github.com/pebble-dev/clay.git
synced 2026-09-05 16:47:37 -04:00
100% code coverage! also move component registration to dev custom fn
This commit is contained in:
+10
-1
@@ -6,7 +6,16 @@ module.exports = function() {
|
|||||||
var Clay = window.Clay = this;
|
var Clay = window.Clay = this;
|
||||||
|
|
||||||
Clay.on(Clay.EVENTS.BEFORE_BUILD, function() {
|
Clay.on(Clay.EVENTS.BEFORE_BUILD, function() {
|
||||||
console.debug('KEEGAN: BEFORE_BUILD', this);
|
|
||||||
|
// register components here
|
||||||
|
this.registerComponent(require('pebble-clay-components').heading);
|
||||||
|
this.registerComponent(require('pebble-clay-components').text);
|
||||||
|
this.registerComponent(require('pebble-clay-components').footer);
|
||||||
|
this.registerComponent(require('pebble-clay-components').input);
|
||||||
|
this.registerComponent(require('pebble-clay-components').color);
|
||||||
|
this.registerComponent(require('pebble-clay-components').select);
|
||||||
|
this.registerComponent(require('pebble-clay-components').toggle);
|
||||||
|
this.registerComponent(require('pebble-clay-components').submit);
|
||||||
});
|
});
|
||||||
|
|
||||||
Clay.on(Clay.EVENTS.AFTER_BUILD, function() {
|
Clay.on(Clay.EVENTS.AFTER_BUILD, function() {
|
||||||
|
|||||||
@@ -12,19 +12,7 @@ var customFn = window.customFn || function() {};
|
|||||||
var $mainForm = $('#main-form');
|
var $mainForm = $('#main-form');
|
||||||
var clayConfig = new ClayConfig(settings, config, $mainForm);
|
var clayConfig = new ClayConfig(settings, config, $mainForm);
|
||||||
|
|
||||||
clayConfig.on(clayConfig.EVENTS.BEFORE_BUILD, function() {
|
/* istanbul ignore next */ // @todo reassess how to do form submission
|
||||||
|
|
||||||
// register components here
|
|
||||||
this.registerComponent(require('pebble-clay-components').heading);
|
|
||||||
this.registerComponent(require('pebble-clay-components').text);
|
|
||||||
this.registerComponent(require('pebble-clay-components').footer);
|
|
||||||
this.registerComponent(require('pebble-clay-components').input);
|
|
||||||
this.registerComponent(require('pebble-clay-components').color);
|
|
||||||
this.registerComponent(require('pebble-clay-components').select);
|
|
||||||
this.registerComponent(require('pebble-clay-components').toggle);
|
|
||||||
this.registerComponent(require('pebble-clay-components').submit);
|
|
||||||
});
|
|
||||||
|
|
||||||
clayConfig.on(clayConfig.EVENTS.AFTER_BUILD, function() {
|
clayConfig.on(clayConfig.EVENTS.AFTER_BUILD, function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user