Skip to content

Commit

Permalink
Merge branch 'develop' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Rodenbeek authored and Noah Rodenbeek committed Oct 18, 2017
2 parents bd39a46 + 55dc0e4 commit da5b19d
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 191 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"email": "[email protected]",
"homepage": "http://rodenbeek.com"
}],
"version": "0.1.3",
"version": "0.1.4",

"homepage": "https://github.com/nominalaeon/french-dip",
"ignore": [
Expand Down
23 changes: 10 additions & 13 deletions french-dip.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,30 @@
(function(root, factory) {
'use strict';

if (typeof define === 'function' && define.amd) {
define(['exports'], factory);
} else if (typeof exports !== 'undefined') {
module.exports = factory(exports);
} else {
factory(root || {});
}
}(this, function(root) {
(function () {
/**
*
* A flexible, light-weight module for creating custom components
*
* @module french-dip
*
* @name FrenchDipJS
* @version 0.1.1
* @version 0.1.4
* @License MIT License
*
*/
'use strict';

var _Components = {};
var errors = [];

if (!Array.prototype.includes) {
_includesPolyfill();
}

if (!Object.assign || typeof Object.assign != 'function') {
_assignPolyfill();
}

root.FrenchDip = {
window.FrenchDip = {
register: register
};

Expand All @@ -51,8 +44,10 @@

function initComponent(el) {
var instanceOptions = Object.assign({}, options, _parseInstanceOptions(el, options));

Component.prototype.root = el;
Component.prototype.options = instanceOptions;

new Component();
}
}
Expand All @@ -65,9 +60,11 @@
// Initialize FrenchDip'ed Components
components.forEach(function(name) {
var selector = '[data-frenchdip="' + name + '"]';

if (typeof _Components[name] !== 'function') {
return errors.push(name);
}

new FrenchDip(selector, {}, _Components[name]);
});
_logErrors();
Expand Down Expand Up @@ -192,4 +189,4 @@
return false;
};
}
}));
})();
25 changes: 11 additions & 14 deletions french-dip.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,17 @@

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

(function (root, factory) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

if (typeof define === 'function' && define.amd) {
define(['exports'], factory);
} else if (typeof exports !== 'undefined') {
module.exports = factory(exports);
} else {
factory(root || {});
}
})(undefined, function (root) {
(function () {
/**
*
* A flexible, light-weight module for creating custom components
*
* @module french-dip
*
* @name FrenchDipJS
* @version 0.1.1
* @version 0.1.4
* @License MIT License
*
*/
Expand All @@ -32,11 +24,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
if (!Array.prototype.includes) {
_includesPolyfill();
}

if (!Object.assign || typeof Object.assign != 'function') {
_assignPolyfill();
}

root.FrenchDip = {
window.FrenchDip = {
register: register
};

Expand All @@ -55,9 +48,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
Array.prototype.forEach.call(elements, initComponent);

function initComponent(el) {
var instanceOptions = Object.assign({}, options, _parseInstanceOptions(el, options));
var instanceOptions = _extends({}, options, _parseInstanceOptions(el, options));

Component.prototype.root = el;
Component.prototype.options = instanceOptions;

new Component();
}
}
Expand All @@ -70,9 +65,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
// Initialize FrenchDip'ed Components
components.forEach(function (name) {
var selector = '[data-frenchdip="' + name + '"]';

if (typeof _Components[name] !== 'function') {
return errors.push(name);
}

new FrenchDip(selector, {}, _Components[name]);
});
_logErrors();
Expand Down Expand Up @@ -202,4 +199,4 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return false;
};
}
});
})();
Loading

0 comments on commit da5b19d

Please sign in to comment.