Permalink
Browse files

chore(babel update): update to babel 6.* with presets + add commitizen

  • Loading branch information...
1 parent bf917ff commit a0ec5f973a0efb78687e531af258b62a15f9aea6 @meandmax committed Nov 4, 2015
Showing with 143 additions and 177 deletions.
  1. +3 −0 .babelrc
  2. +2 −0 README.md
  3. +33 −45 demo/js/jquery.lory.js
  4. +1 −1 demo/js/jquery.lory.min.js
  5. +28 −38 demo/js/lory.js
  6. +1 −1 demo/js/lory.min.js
  7. +33 −45 dist/jquery.lory.js
  8. +1 −1 dist/jquery.lory.min.js
  9. +28 −38 dist/lory.js
  10. +1 −1 dist/lory.min.js
  11. +10 −2 package.json
  12. +2 −5 webpack.config.js
View
@@ -0,0 +1,3 @@
+{
+ "presets": ["es2015", "stage-0"]
+}
View
@@ -17,6 +17,8 @@ Please visit: [http://meandmax.github.io/lory/](http://meandmax.github.io/lory/
[![Join the chat at https://gitter.im/meandmax/lory](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/meandmax/lory?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
+[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
+
[![Sauce Test Status](https://saucelabs.com/browser-matrix/meandmax.svg)](https://saucelabs.com/u/meandmax)
@@ -54,56 +54,53 @@ return /******/ (function(modules) { // webpackBootstrap
/* 0 */
/***/ function(module, exports, __webpack_require__) {
- /* globals $ */
-
'use strict';
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ var _lory = __webpack_require__(1);
- var _loryJs = __webpack_require__(1);
+ var _lory2 = _interopRequireDefault(_lory);
- var _loryJs2 = _interopRequireDefault(_loryJs);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
$.fn.lory = function (options) {
return this.each(function () {
var instanceOptions;
if (!$.data(this, 'lory')) {
instanceOptions = $.extend({}, options, $(this).data());
- $.data(this, 'lory', (0, _loryJs2['default'])(this, instanceOptions));
+ $.data(this, 'lory', (0, _lory2.default)(this, instanceOptions));
}
});
- };
+ }; /* globals $ */
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
- /* globals jQuery */
-
'use strict';
- Object.defineProperty(exports, '__esModule', {
+ 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; };
+
+ Object.defineProperty(exports, "__esModule", {
value: true
});
+ exports.default = lory;
- 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; };
-
- exports['default'] = lory;
+ var _detectPrefixes = __webpack_require__(2);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ var _detectPrefixes2 = _interopRequireDefault(_detectPrefixes);
- var _utilsDetectPrefixesJs = __webpack_require__(2);
+ var _dispatchEvent = __webpack_require__(3);
- var _utilsDetectPrefixesJs2 = _interopRequireDefault(_utilsDetectPrefixesJs);
+ var _dispatchEvent2 = _interopRequireDefault(_dispatchEvent);
- var _utilsDispatchEventJs = __webpack_require__(3);
+ var _defaults = __webpack_require__(5);
- var _utilsDispatchEventJs2 = _interopRequireDefault(_utilsDispatchEventJs);
+ var _defaults2 = _interopRequireDefault(_defaults);
- var _defaultsJs = __webpack_require__(5);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _defaultsJs2 = _interopRequireDefault(_defaultsJs);
+ function _instanceof(left, right) { if (right != null && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } } /* globals jQuery */
var slice = Array.prototype.slice;
@@ -129,7 +126,7 @@ return /******/ (function(modules) { // webpackBootstrap
/**
* if object is jQuery convert to native DOM element
*/
- if (typeof jQuery !== 'undefined' && slider instanceof jQuery) {
+ if (typeof jQuery !== 'undefined' && _instanceof(slider, jQuery)) {
slider = slider[0];
}
@@ -186,7 +183,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @return {[type]} [description]
*/
function dispatchSliderEvent(phase, type, detail) {
- (0, _utilsDispatchEventJs2['default'])(slider, phase + '.lory.' + type, detail);
+ (0, _dispatchEvent2.default)(slider, phase + '.lory.' + type, detail);
}
/**
@@ -306,8 +303,8 @@ return /******/ (function(modules) { // webpackBootstrap
function setup() {
dispatchSliderEvent('before', 'init');
- prefixes = (0, _utilsDetectPrefixesJs2['default'])();
- options = _extends({}, _defaultsJs2['default'], opts);
+ prefixes = (0, _detectPrefixes2.default)();
+ options = _extends({}, _defaults2.default, opts);
var _options4 = options;
var classNameFrame = _options4.classNameFrame;
@@ -601,22 +598,19 @@ return /******/ (function(modules) { // webpackBootstrap
};
}
- module.exports = exports['default'];
-
/***/ },
/* 2 */
/***/ function(module, exports) {
- /**
- * Detecting prefixes for saving time and bytes
- */
'use strict';
- Object.defineProperty(exports, '__esModule', {
+ Object.defineProperty(exports, "__esModule", {
value: true
});
- exports['default'] = detectPrefixes;
-
+ exports.default = detectPrefixes;
+ /**
+ * Detecting prefixes for saving time and bytes
+ */
function detectPrefixes() {
var transform = undefined;
var transition = undefined;
@@ -657,35 +651,32 @@ return /******/ (function(modules) { // webpackBootstrap
};
}
- module.exports = exports['default'];
-
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- Object.defineProperty(exports, '__esModule', {
+ Object.defineProperty(exports, "__esModule", {
value: true
});
- exports['default'] = dispatchEvent;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ exports.default = dispatchEvent;
var _customEvent = __webpack_require__(4);
var _customEvent2 = _interopRequireDefault(_customEvent);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
/**
* dispatch custom events
*
* @param {element} el slideshow element
* @param {string} type custom event name
* @param {object} detail custom detail information
*/
-
function dispatchEvent(target, type, detail) {
- var event = new _customEvent2['default'](type, {
+ var event = new _customEvent2.default(type, {
bubbles: true,
cancelable: true,
detail: detail
@@ -694,8 +685,6 @@ return /******/ (function(modules) { // webpackBootstrap
target.dispatchEvent(event);
}
- module.exports = exports['default'];
-
/***/ },
/* 4 */
/***/ function(module, exports) {
@@ -757,10 +746,10 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';
- Object.defineProperty(exports, '__esModule', {
+ Object.defineProperty(exports, "__esModule", {
value: true
});
- exports['default'] = {
+ exports.default = {
/**
* slides scrolled at once
* @slidesToScroll {Number}
@@ -843,7 +832,6 @@ return /******/ (function(modules) { // webpackBootstrap
*/
enableMouseEvents: false
};
- module.exports = exports['default'];
/***/ }
/******/ ])
Oops, something went wrong.

0 comments on commit a0ec5f9

Please sign in to comment.