Skip to content

Commit 62eebea

Browse files
committed
build: release 1.0.0
1 parent 4152050 commit 62eebea

File tree

9 files changed

+363
-200
lines changed

9 files changed

+363
-200
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.0.0 (Apr 1, 2018)
4+
5+
- Just released as a stable version.
6+
37
## 1.0.0-beta (Mar 3, 2018)
48

59
- Release the beta version.

dist/jquery-cropper.common.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* jQuery Cropper v1.0.0-beta
2+
* jQuery Cropper v1.0.0
33
* https://github.com/fengyuanchen/jquery-cropper
44
*
55
* Copyright (c) 2018 Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2018-03-03T04:12:17.906Z
8+
* Date: 2018-04-01T06:20:13.168Z
99
*/
1010

1111
'use strict';
@@ -59,7 +59,7 @@ if ($.fn) {
5959
}
6060
});
6161

62-
return typeof result === 'undefined' ? this : result;
62+
return result !== undefined ? result : this;
6363
};
6464

6565
$.fn.cropper.Constructor = Cropper;

dist/jquery-cropper.esm.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* jQuery Cropper v1.0.0-beta
2+
* jQuery Cropper v1.0.0
33
* https://github.com/fengyuanchen/jquery-cropper
44
*
55
* Copyright (c) 2018 Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2018-03-03T04:12:17.906Z
8+
* Date: 2018-04-01T06:20:13.168Z
99
*/
1010

1111
import $ from 'jquery';
@@ -55,7 +55,7 @@ if ($.fn) {
5555
}
5656
});
5757

58-
return typeof result === 'undefined' ? this : result;
58+
return result !== undefined ? result : this;
5959
};
6060

6161
$.fn.cropper.Constructor = Cropper;

dist/jquery-cropper.js

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
/*!
2-
* jQuery Cropper v1.0.0-beta
2+
* jQuery Cropper v1.0.0
33
* https://github.com/fengyuanchen/jquery-cropper
44
*
55
* Copyright (c) 2018 Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2018-03-03T04:12:17.906Z
8+
* Date: 2018-04-01T06:20:13.168Z
99
*/
1010

1111
(function (global, factory) {
12-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) :
13-
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) :
14-
(factory(global.jQuery,global.Cropper));
12+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) :
13+
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) :
14+
(factory(global.jQuery,global.Cropper));
1515
}(this, (function ($,Cropper) { 'use strict';
1616

17-
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
18-
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper;
17+
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
18+
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper;
1919

20-
if ($.fn) {
21-
var AnotherCropper = $.fn.cropper;
22-
var NAMESPACE = 'cropper';
20+
if ($.fn) {
21+
var AnotherCropper = $.fn.cropper;
22+
var NAMESPACE = 'cropper';
2323

24-
$.fn.cropper = function jQueryCropper(option) {
25-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
26-
args[_key - 1] = arguments[_key];
27-
}
24+
$.fn.cropper = function jQueryCropper(option) {
25+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
26+
args[_key - 1] = arguments[_key];
27+
}
2828

29-
var result = void 0;
29+
var result = void 0;
3030

31-
this.each(function (i, element) {
32-
var $element = $(element);
33-
var isDestroy = option === 'destroy';
34-
var cropper = $element.data(NAMESPACE);
31+
this.each(function (i, element) {
32+
var $element = $(element);
33+
var isDestroy = option === 'destroy';
34+
var cropper = $element.data(NAMESPACE);
3535

36-
if (!cropper) {
37-
if (isDestroy) {
38-
return;
39-
}
36+
if (!cropper) {
37+
if (isDestroy) {
38+
return;
39+
}
4040

41-
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
41+
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
4242

43-
cropper = new Cropper(element, options);
44-
$element.data(NAMESPACE, cropper);
45-
}
43+
cropper = new Cropper(element, options);
44+
$element.data(NAMESPACE, cropper);
45+
}
4646

47-
if (typeof option === 'string') {
48-
var fn = cropper[option];
47+
if (typeof option === 'string') {
48+
var fn = cropper[option];
4949

50-
if ($.isFunction(fn)) {
51-
result = fn.apply(cropper, args);
50+
if ($.isFunction(fn)) {
51+
result = fn.apply(cropper, args);
5252

53-
if (result === cropper) {
54-
result = undefined;
55-
}
53+
if (result === cropper) {
54+
result = undefined;
55+
}
5656

57-
if (isDestroy) {
58-
$element.removeData(NAMESPACE);
57+
if (isDestroy) {
58+
$element.removeData(NAMESPACE);
59+
}
5960
}
6061
}
61-
}
62-
});
63-
64-
return typeof result === 'undefined' ? this : result;
65-
};
66-
67-
$.fn.cropper.Constructor = Cropper;
68-
$.fn.cropper.setDefaults = Cropper.setDefaults;
69-
$.fn.cropper.noConflict = function noConflict() {
70-
$.fn.cropper = AnotherCropper;
71-
return this;
72-
};
73-
}
62+
});
63+
64+
return result !== undefined ? result : this;
65+
};
66+
67+
$.fn.cropper.Constructor = Cropper;
68+
$.fn.cropper.setDefaults = Cropper.setDefaults;
69+
$.fn.cropper.noConflict = function noConflict() {
70+
$.fn.cropper = AnotherCropper;
71+
return this;
72+
};
73+
}
7474

7575
})));

dist/jquery-cropper.min.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* jQuery Cropper v1.0.0-beta
2+
* jQuery Cropper v1.0.0
33
* https://github.com/fengyuanchen/jquery-cropper
44
*
55
* Copyright (c) 2018 Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2018-03-03T04:12:17.906Z
8+
* Date: 2018-04-01T06:20:13.168Z
99
*/
10-
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("jquery"),require("cropperjs")):"function"==typeof define&&define.amd?define(["jquery","cropperjs"],r):r(e.jQuery,e.Cropper)}(this,function(e,r){"use strict";if(e=e&&e.hasOwnProperty("default")?e.default:e,r=r&&r.hasOwnProperty("default")?r.default:r,e.fn){var t=e.fn.cropper,n="cropper";e.fn.cropper=function(t){for(var o=arguments.length,f=Array(o>1?o-1:0),i=1;i<o;i++)f[i-1]=arguments[i];var p=void 0;return this.each(function(o,i){var a=e(i),u="destroy"===t,c=a.data(n);if(!c){if(u)return;var s=e.extend({},a.data(),e.isPlainObject(t)&&t);c=new r(i,s),a.data(n,c)}if("string"==typeof t){var d=c[t];e.isFunction(d)&&((p=d.apply(c,f))===c&&(p=void 0),u&&a.removeData(n))}}),void 0===p?this:p},e.fn.cropper.Constructor=r,e.fn.cropper.setDefaults=r.setDefaults,e.fn.cropper.noConflict=function(){return e.fn.cropper=t,this}}});
10+
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("jquery"),require("cropperjs")):"function"==typeof define&&define.amd?define(["jquery","cropperjs"],r):r(e.jQuery,e.Cropper)}(this,function(c,s){"use strict";if(c=c&&c.hasOwnProperty("default")?c.default:c,s=s&&s.hasOwnProperty("default")?s.default:s,c.fn){var e=c.fn.cropper,d="cropper";c.fn.cropper=function(p){for(var e=arguments.length,a=Array(1<e?e-1:0),r=1;r<e;r++)a[r-1]=arguments[r];var u=void 0;return this.each(function(e,r){var t=c(r),n="destroy"===p,o=t.data(d);if(!o){if(n)return;var f=c.extend({},t.data(),c.isPlainObject(p)&&p);o=new s(r,f),t.data(d,o)}if("string"==typeof p){var i=o[p];c.isFunction(i)&&((u=i.apply(o,a))===o&&(u=void 0),n&&t.removeData(d))}}),void 0!==u?u:this},c.fn.cropper.Constructor=s,c.fn.cropper.setDefaults=s.setDefaults,c.fn.cropper.noConflict=function(){return c.fn.cropper=e,this}}});

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<div class="container">
4747
<div class="row">
4848
<div class="col-md">
49-
<h1>jquery-cropper <small class="h6">v1.0.0-beta</small></h1>
49+
<h1>jquery-cropper <small class="h6">v1.0.0</small></h1>
5050
<p class="lead">A jQuery plugin wrapper for Cropper.js.</p>
5151
</div>
5252
<div class="col-md">

docs/js/jquery-cropper.js

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
/*!
2-
* jQuery Cropper v1.0.0-beta
2+
* jQuery Cropper v1.0.0
33
* https://github.com/fengyuanchen/jquery-cropper
44
*
55
* Copyright (c) 2018 Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2018-03-03T04:12:17.906Z
8+
* Date: 2018-04-01T06:20:13.168Z
99
*/
1010

1111
(function (global, factory) {
12-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) :
13-
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) :
14-
(factory(global.jQuery,global.Cropper));
12+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) :
13+
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) :
14+
(factory(global.jQuery,global.Cropper));
1515
}(this, (function ($,Cropper) { 'use strict';
1616

17-
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
18-
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper;
17+
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
18+
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper;
1919

20-
if ($.fn) {
21-
var AnotherCropper = $.fn.cropper;
22-
var NAMESPACE = 'cropper';
20+
if ($.fn) {
21+
var AnotherCropper = $.fn.cropper;
22+
var NAMESPACE = 'cropper';
2323

24-
$.fn.cropper = function jQueryCropper(option) {
25-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
26-
args[_key - 1] = arguments[_key];
27-
}
24+
$.fn.cropper = function jQueryCropper(option) {
25+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
26+
args[_key - 1] = arguments[_key];
27+
}
2828

29-
var result = void 0;
29+
var result = void 0;
3030

31-
this.each(function (i, element) {
32-
var $element = $(element);
33-
var isDestroy = option === 'destroy';
34-
var cropper = $element.data(NAMESPACE);
31+
this.each(function (i, element) {
32+
var $element = $(element);
33+
var isDestroy = option === 'destroy';
34+
var cropper = $element.data(NAMESPACE);
3535

36-
if (!cropper) {
37-
if (isDestroy) {
38-
return;
39-
}
36+
if (!cropper) {
37+
if (isDestroy) {
38+
return;
39+
}
4040

41-
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
41+
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
4242

43-
cropper = new Cropper(element, options);
44-
$element.data(NAMESPACE, cropper);
45-
}
43+
cropper = new Cropper(element, options);
44+
$element.data(NAMESPACE, cropper);
45+
}
4646

47-
if (typeof option === 'string') {
48-
var fn = cropper[option];
47+
if (typeof option === 'string') {
48+
var fn = cropper[option];
4949

50-
if ($.isFunction(fn)) {
51-
result = fn.apply(cropper, args);
50+
if ($.isFunction(fn)) {
51+
result = fn.apply(cropper, args);
5252

53-
if (result === cropper) {
54-
result = undefined;
55-
}
53+
if (result === cropper) {
54+
result = undefined;
55+
}
5656

57-
if (isDestroy) {
58-
$element.removeData(NAMESPACE);
57+
if (isDestroy) {
58+
$element.removeData(NAMESPACE);
59+
}
5960
}
6061
}
61-
}
62-
});
63-
64-
return typeof result === 'undefined' ? this : result;
65-
};
66-
67-
$.fn.cropper.Constructor = Cropper;
68-
$.fn.cropper.setDefaults = Cropper.setDefaults;
69-
$.fn.cropper.noConflict = function noConflict() {
70-
$.fn.cropper = AnotherCropper;
71-
return this;
72-
};
73-
}
62+
});
63+
64+
return result !== undefined ? result : this;
65+
};
66+
67+
$.fn.cropper.Constructor = Cropper;
68+
$.fn.cropper.setDefaults = Cropper.setDefaults;
69+
$.fn.cropper.noConflict = function noConflict() {
70+
$.fn.cropper = AnotherCropper;
71+
return this;
72+
};
73+
}
7474

7575
})));

0 commit comments

Comments
 (0)