From 5038443d13bc8568e716883faf6288a7d526eb0f Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 25 Sep 2017 05:53:29 +0700 Subject: [PATCH] 2.2.0 --- README.md | 1 + dist/vue-numeric.min.js | 2 +- docs/index.html | 1 + package.json | 34 ++++++-- webpack.config.js | 15 ++-- yarn.lock | 172 ++++++++++++++++++++++------------------ 6 files changed, 134 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index 1315474..0327dcf 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Input field component to display a formatted currency value based on [Vue](https ### Install via CDN ```html + diff --git a/dist/vue-numeric.min.js b/dist/vue-numeric.min.js index b5005d9..8746530 100644 --- a/dist/vue-numeric.min.js +++ b/dist/vue-numeric.min.js @@ -1 +1 @@ -!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("VueNumeric",[],e):"object"==typeof exports?exports.VueNumeric=e():n.VueNumeric=e()}(this,function(){return function(n){function e(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return n[l].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var t={};return e.m=n,e.c=t,e.d=function(n,t,l){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:l})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},e.p="",e(e.s=0)}([function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l=function(){var n="/Users/kevin/Projects/vue-numeric/src/index.js",e="ba3c0e201451d7ac8c822f3bceb5f1ea9a33a2d0",t=new Function("return this")(),l="__coverage__",o={path:"/Users/kevin/Projects/vue-numeric/src/index.js",statementMap:{0:{start:{line:3,column:15},end:{line:7,column:1}},1:{start:{line:5,column:4},end:{line:5,column:44}},2:{start:{line:9,column:0},end:{line:9,column:34}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:11},end:{line:4,column:12}},loc:{start:{line:4,column:18},end:{line:6,column:3}},line:4}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},i=t[l]||(t[l]={});return i[n]&&i[n].hash===e?i[n]:(o.hash=e,i[n]=o)}(),o=t(1),i=function(n){return n&&n.__esModule?n:{default:n}}(o),r=(l.s[0]++,{install:function(n){l.f[0]++,l.s[1]++,n.component(i.default.name,i.default)}});l.s[2]++,i.default.install=r.install,e.default=i.default},function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l=t(3),o=t.n(l),i=t(5),r=t(2),u=r(o.a,i.a,null,null,null);e.default=u.exports},function(n,e){n.exports=function(n,e,t,l,o){var i,r=n=n||{},u=typeof n.default;"object"!==u&&"function"!==u||(i=n,r=n.default);var c="function"==typeof r?r.options:r;e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns),l&&(c._scopeId=l);var a;if(o?(a=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),t&&t.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(o)},c._ssrRegister=a):t&&(a=t),a){var s=c.functional,m=s?c.render:c.beforeCreate;s?c.render=function(n,e){return a.call(e),m(n,e)}:c.beforeCreate=m?[].concat(m,a):[a]}return{esModule:i,exports:r,options:c}}},function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l=function(){var n="/Users/kevin/Projects/vue-numeric/src/vue-numeric.vue",e="b4510fa0d4b50e46f50f98f09529171ae2dd26cc",t=new Function("return this")(),l="__coverage__",o={path:"/Users/kevin/Projects/vue-numeric/src/vue-numeric.vue",statementMap:{0:{start:{line:124,column:15},end:{line:126,column:3}},1:{start:{line:134,column:6},end:{line:134,column:39}},2:{start:{line:142,column:6},end:{line:142,column:38}},3:{start:{line:150,column:6},end:{line:150,column:44}},4:{start:{line:150,column:34},end:{line:150,column:44}},5:{start:{line:151,column:6},end:{line:151,column:16}},6:{start:{line:159,column:6},end:{line:159,column:44}},7:{start:{line:159,column:34},end:{line:159,column:44}},8:{start:{line:160,column:6},end:{line:160,column:16}},9:{start:{line:168,column:6},end:{line:168,column:37}},10:{start:{line:168,column:26},end:{line:168,column:37}},11:{start:{line:169,column:6},end:{line:169,column:73}},12:{start:{line:178,column:6},end:{line:178,column:49}},13:{start:{line:185,column:6},end:{line:185,column:36}},14:{start:{line:192,column:6},end:{line:192,column:37}},15:{start:{line:200,column:6},end:{line:200,column:50}},16:{start:{line:200,column:29},end:{line:200,column:50}},17:{start:{line:201,column:6},end:{line:201,column:50}},18:{start:{line:201,column:29},end:{line:201,column:50}},19:{start:{line:202,column:6},end:{line:202,column:66}},20:{start:{line:202,column:48},end:{line:202,column:66}},21:{start:{line:203,column:6},end:{line:203,column:90}},22:{start:{line:203,column:36},end:{line:203,column:90}},23:{start:{line:211,column:6},end:{line:211,column:76}},24:{start:{line:220,column:6},end:{line:226,column:8}},25:{start:{line:235,column:6},end:{line:235,column:62}},26:{start:{line:246,column:6},end:{line:251,column:7}},27:{start:{line:247,column:8},end:{line:247,column:30}},28:{start:{line:248,column:8},end:{line:250,column:9}},29:{start:{line:249,column:10},end:{line:249,column:45}},30:{start:{line:260,column:6},end:{line:264,column:7}},31:{start:{line:261,column:8},end:{line:263,column:10}},32:{start:{line:262,column:10},end:{line:262,column:60}},33:{start:{line:271,column:6},end:{line:271,column:36}},34:{start:{line:272,column:6},end:{line:272,column:49}},35:{start:{line:278,column:4},end:{line:287,column:5}},36:{start:{line:279,column:6},end:{line:279,column:36}},37:{start:{line:280,column:6},end:{line:280,column:49}},38:{start:{line:283,column:6},end:{line:286,column:13}},39:{start:{line:284,column:8},end:{line:284,column:38}},40:{start:{line:285,column:8},end:{line:285,column:51}},41:{start:{line:290,column:4},end:{line:292,column:5}},42:{start:{line:291,column:6},end:{line:291,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:124,column:8},end:{line:124,column:9}},loc:{start:{line:124,column:15},end:{line:126,column:3}},line:124},1:{name:"(anonymous_1)",decl:{start:{line:261,column:23},end:{line:261,column:24}},loc:{start:{line:261,column:29},end:{line:263,column:9}},line:261},2:{name:"(anonymous_2)",decl:{start:{line:283,column:17},end:{line:283,column:18}},loc:{start:{line:283,column:23},end:{line:286,column:7}},line:283}},branchMap:{0:{loc:{start:{line:150,column:6},end:{line:150,column:44}},type:"if",locations:[{start:{line:150,column:6},end:{line:150,column:44}},{start:{line:150,column:6},end:{line:150,column:44}}],line:150},1:{loc:{start:{line:159,column:6},end:{line:159,column:44}},type:"if",locations:[{start:{line:159,column:6},end:{line:159,column:44}},{start:{line:159,column:6},end:{line:159,column:44}}],line:159},2:{loc:{start:{line:168,column:6},end:{line:168,column:37}},type:"if",locations:[{start:{line:168,column:6},end:{line:168,column:37}},{start:{line:168,column:6},end:{line:168,column:37}}],line:168},3:{loc:{start:{line:169,column:13},end:{line:169,column:73}},type:"cond-expr",locations:[{start:{line:169,column:56},end:{line:169,column:63}},{start:{line:169,column:66},end:{line:169,column:73}}],line:169},4:{loc:{start:{line:200,column:6},end:{line:200,column:50}},type:"if",locations:[{start:{line:200,column:6},end:{line:200,column:50}},{start:{line:200,column:6},end:{line:200,column:50}}],line:200},5:{loc:{start:{line:201,column:6},end:{line:201,column:50}},type:"if",locations:[{start:{line:201,column:6},end:{line:201,column:50}},{start:{line:201,column:6},end:{line:201,column:50}}],line:201},6:{loc:{start:{line:202,column:6},end:{line:202,column:66}},type:"if",locations:[{start:{line:202,column:6},end:{line:202,column:66}},{start:{line:202,column:6},end:{line:202,column:66}}],line:202},7:{loc:{start:{line:202,column:10},end:{line:202,column:46}},type:"binary-expr",locations:[{start:{line:202,column:10},end:{line:202,column:26}},{start:{line:202,column:30},end:{line:202,column:46}}],line:202},8:{loc:{start:{line:203,column:6},end:{line:203,column:90}},type:"if",locations:[{start:{line:203,column:6},end:{line:203,column:90}},{start:{line:203,column:6},end:{line:203,column:90}}],line:203},9:{loc:{start:{line:203,column:10},end:{line:203,column:34}},type:"binary-expr",locations:[{start:{line:203,column:10},end:{line:203,column:21}},{start:{line:203,column:25},end:{line:203,column:34}}],line:203},10:{loc:{start:{line:203,column:36},end:{line:203,column:90}},type:"cond-expr",locations:[{start:{line:203,column:52},end:{line:203,column:73}},{start:{line:203,column:76},end:{line:203,column:90}}],line:203},11:{loc:{start:{line:246,column:6},end:{line:251,column:7}},type:"if",locations:[{start:{line:246,column:6},end:{line:251,column:7}},{start:{line:246,column:6},end:{line:251,column:7}}],line:246},12:{loc:{start:{line:246,column:10},end:{line:246,column:74}},type:"binary-expr",locations:[{start:{line:246,column:10},end:{line:246,column:40}},{start:{line:246,column:44},end:{line:246,column:74}}],line:246},13:{loc:{start:{line:248,column:8},end:{line:250,column:9}},type:"if",locations:[{start:{line:248,column:8},end:{line:250,column:9}},{start:{line:248,column:8},end:{line:250,column:9}}],line:248},14:{loc:{start:{line:260,column:6},end:{line:264,column:7}},type:"if",locations:[{start:{line:260,column:6},end:{line:264,column:7}},{start:{line:260,column:6},end:{line:264,column:7}}],line:260},15:{loc:{start:{line:260,column:10},end:{line:260,column:49}},type:"binary-expr",locations:[{start:{line:260,column:10},end:{line:260,column:28}},{start:{line:260,column:32},end:{line:260,column:49}}],line:260},16:{loc:{start:{line:278,column:4},end:{line:287,column:5}},type:"if",locations:[{start:{line:278,column:4},end:{line:287,column:5}},{start:{line:278,column:4},end:{line:287,column:5}}],line:278},17:{loc:{start:{line:290,column:4},end:{line:292,column:5}},type:"if",locations:[{start:{line:290,column:4},end:{line:292,column:5}},{start:{line:290,column:4},end:{line:292,column:5}}],line:290}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},i=t[l]||(t[l]={});return i[n]&&i[n].hash===e?i[n]:(o.hash=e,i[n]=o)}(),o=t(4),i=function(n){return n&&n.__esModule?n:{default:n}}(o);e.default={name:"vue-numeric",props:{currency:{default:"",required:!1,type:String},max:{default:Number.MAX_SAFE_INTEGER,required:!1,type:Number},min:{default:Number.MIN_SAFE_INTEGER,required:!1,type:Number},minus:{default:!1,required:!1,type:Boolean},placeholder:{required:!1,type:String},precision:{required:!1,type:Number},separator:{default:",",required:!1,type:String},value:{default:0,required:!0,type:[Number,String]},readOnly:{default:!1,required:!1,type:Boolean},readOnlyClass:{default:"",required:!1,type:String},currencySymbolPosition:{default:"prefix",required:!1,type:String}},data:function(){return l.f[0]++,l.s[0]++,{amount:""}},computed:{amountNumber:function(){return l.s[1]++,this.unformat(this.amount)},valueNumber:function(){return l.s[2]++,this.unformat(this.value)},decimalSeparator:function(){return l.s[3]++,"."===this.separator?(l.b[0][0]++,l.s[4]++,","):(l.b[0][1]++,l.s[5]++,".")},thousandSeparator:function(){return l.s[6]++,"."===this.separator?(l.b[1][0]++,l.s[7]++,"."):(l.b[1][1]++,l.s[8]++,",")},symbolPosition:function(){return l.s[9]++,this.currency?(l.b[2][1]++,l.s[11]++,"suffix"===this.currencySymbolPosition?(l.b[3][0]++,"%v %s"):(l.b[3][1]++,"%s %v")):(l.b[2][0]++,l.s[10]++,"%v")}},methods:{onBlurHandler:function(){l.s[12]++,this.amount=this.format(this.valueNumber)},onFocusHandler:function(){l.s[13]++,this.amount=this.valueNumber},onInputHandler:function(){l.s[14]++,this.process(this.amountNumber)},process:function(n){l.s[15]++,n>=this.max?(l.b[4][0]++,l.s[16]++,this.update(this.max)):l.b[4][1]++,l.s[17]++,n<=this.min?(l.b[5][0]++,l.s[18]++,this.update(this.min)):l.b[5][1]++,l.s[19]++,l.b[7][0]++,n>this.min&&(l.b[7][1]++,n=0?(l.b[10][0]++,this.update(this.min)):(l.b[10][1]++,this.update(0))):l.b[8][1]++},update:function(n){l.s[23]++,this.$emit("input",Number(i.default.toFixed(n,this.precision)))},format:function(n){return l.s[24]++,i.default.formatMoney(n,{symbol:this.currency,format:this.symbolPosition,precision:Number(this.precision),decimal:this.decimalSeparator,thousand:this.thousandSeparator})},unformat:function(n){return l.s[25]++,i.default.unformat(n,this.decimalSeparator)}},watch:{valueNumber:function(n,e){l.s[26]++,l.b[12][0]++,this.amountNumber!==n&&(l.b[12][1]++,this.amountNumber===e)?(l.b[11][0]++,l.s[27]++,this.amount=n,l.s[28]++,this.$refs.numeric!==document.activeElement?(l.b[13][0]++,l.s[29]++,this.amount=this.format(n)):l.b[13][1]++):l.b[11][1]++},readOnly:function(n,e){var t=this;l.s[30]++,l.b[15][0]++,!1===e&&(l.b[15][1]++,!0===n)?(l.b[14][0]++,l.s[31]++,this.$nextTick(function(){l.f[1]++,l.s[32]++,t.$refs.readOnly.className=t.readOnlyClass})):l.b[14][1]++},separator:function(){l.s[33]++,this.process(this.valueNumber),l.s[34]++,this.amount=this.format(this.valueNumber)}},mounted:function(){var n=this;l.s[35]++,this.placeholder?l.b[16][1]++:(l.b[16][0]++,l.s[36]++,this.process(this.valueNumber),l.s[37]++,this.amount=this.format(this.valueNumber),l.s[38]++,setTimeout(function(){l.f[2]++,l.s[39]++,n.process(n.valueNumber),l.s[40]++,n.amount=n.format(n.valueNumber)},500)),l.s[41]++,this.readOnly?(l.b[17][0]++,l.s[42]++,this.$refs.readOnly.className=this.readOnlyClass):l.b[17][1]++}}},function(n,e,t){!function(n,t){t(e)}(0,function(n){"use strict";function e(n,e){return e={exports:{}},n(e,e.exports),e.exports}function t(n){var e=arguments.length<=1||void 0===arguments[1]?s.decimal:arguments[1],l=arguments.length<=2||void 0===arguments[2]?s.fallback:arguments[2];if(Array.isArray(n))return n.map(function(n){return t(n,e,l)});if("number"==typeof n)return n;var o=new RegExp("[^0-9-(-)-"+e+"]",["g"]),i=(""+n).replace(o,"").replace(e,".").replace(/\(([-]*\d*[^)]?\d+)\)/g,"-$1").replace(/\((.*)\)/,""),r=(i.match(/-/g)||2).length%2,u=parseFloat(i.replace(/-/g,"")),c=u*(r?-1:1);return isNaN(c)?l:c}function l(n,e){return n=Math.round(Math.abs(n)),isNaN(n)?e:n}function o(n,e){e=l(e,s.precision);var t=Math.pow(10,e);return(Math.round((n+1e-8)*t)/t).toFixed(e)}function i(n,e){var t=n.split(e),l=t[0],o=t[1].replace(/0+$/,"");return o.length>0?l+e+o:l}function r(n){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(Array.isArray(n))return n.map(function(n){return r(n,e)});e=d({},s,e);var t=n<0?"-":"",l=parseInt(o(Math.abs(n),e.precision),10)+"",u=l.length>3?l.length%3:0,c=t+(u?l.substr(0,u)+e.thousand:"")+l.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+e.thousand)+(e.precision>0?e.decimal+o(Math.abs(n),e.precision).split(".")[1]:"");return e.stripZeros?i(c,e.decimal):c}function u(n){return p(n)&&n.match("%v")?{pos:n,neg:n.replace("-","").replace("%v","-%v"),zero:n}:n}function c(n){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(Array.isArray(n))return n.map(function(n){return c(n,e)});e=d({},s,e);var t=u(e.format),l=void 0;return l=n>0?t.pos:n<0?t.neg:t.zero,l.replace("%s",e.symbol).replace("%v",r(Math.abs(n),e))}function a(n){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(!n)return[];e=d({},s,e);var l=u(e.format),o=l.pos.indexOf("%s")0?l.pos:n<0?l.neg:l.zero;var u=o.replace("%s",e.symbol).replace("%v",r(Math.abs(n),e));return u.length>i&&(i=u.length),u}).map(function(n){return p(n)&&n.length=this.max&&this.update(this.max),e<=this.min&&this.update(this.min),e>this.min&&e=0?this.update(this.min):this.update(0))},update:function(e){this.$emit("input",Number(u.a.toFixed(e,this.precision)))},format:function(e){return u.a.formatMoney(e,{symbol:this.currency,format:this.symbolPosition,precision:Number(this.precision),decimal:this.decimalSeparator,thousand:this.thousandSeparator})},unformat:function(e){return u.a.unformat(e,this.decimalSeparator)}},watch:{valueNumber:function(e,t){this.amountNumber!==e&&this.amountNumber===t&&(this.amount=e,this.$refs.numeric!==document.activeElement&&(this.amount=this.format(e)))},readOnly:function(e,t){var n=this;!1===t&&!0===e&&this.$nextTick(function(){n.$refs.readOnly.className=n.readOnlyClass})},separator:function(){this.process(this.valueNumber),this.amount=this.format(this.valueNumber)},currency:function(){this.process(this.valueNumber),this.amount=this.format(this.valueNumber)}},mounted:function(){var e=this;this.placeholder||(this.process(this.valueNumber),this.amount=this.format(this.valueNumber),setTimeout(function(){e.process(e.valueNumber),e.amount=e.format(e.valueNumber)},500)),this.readOnly&&(this.$refs.readOnly.className=this.readOnlyClass)}}},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.readOnly?n("span",{ref:"readOnly"},[e._v(e._s(e.amount))]):n("input",{directives:[{name:"model",rawName:"v-model",value:e.amount,expression:"amount"}],ref:"numeric",attrs:{placeholder:e.placeholder,type:"tel"},domProps:{value:e.value,value:e.amount},on:{blur:e.onBlurHandler,input:[function(t){t.target.composing||(e.amount=t.target.value)},e.onInputHandler],focus:e.onFocusHandler}})},u=[],i={render:r,staticRenderFns:u};t.a=i}])}); \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 17dcc1a..4a8bedd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -124,6 +124,7 @@

+ diff --git a/package.json b/package.json index da4886a..5c7f656 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-numeric", - "version": "2.1.2", + "version": "2.2.0", "description": "Input field component to display currency value based on Vue.", "author": "Kevin Ongko", "main": "dist/vue-numeric.min.js", @@ -28,8 +28,8 @@ "accounting-js": "^1.1.1" }, "scripts": { - "test": "./node_modules/.bin/karma start test/karma.config.js", - "test:watch": "./node_modules/.bin/karma start test/karma.config.js --single-run=false", + "test": "cross-env BABEL_ENV=test ./node_modules/.bin/karma start test/karma.config.js", + "test:watch": "cross-env BABEL_ENV=test ./node_modules/.bin/karma start test/karma.config.js --single-run=false", "lint": "./node_modules/.bin/eslint --ext .js,.vue src spec", "build": "./node_modules/.bin/webpack --hide-modules -p --progress", "report-coverage": "codecov" @@ -39,10 +39,11 @@ "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-plugin-istanbul": "^4.1.4", - "babel-preset-latest": "^6.24.1", + "babel-preset-env": "^1.6.0", "chai": "^4.1.2", "clean-webpack-plugin": "^0.1.16", "codecov": "^2.3.0", + "cross-env": "^5.0.5", "css-loader": "^0.28.7", "eslint": "^4.6.0", "eslint-plugin-vue": "3.12.0", @@ -65,11 +66,28 @@ }, "babel": { "presets": [ - "latest" + [ + "env", + { + "uglify": true, + "modules": false, + "targets": { + "browsers": [ + "> 1%", + "last 2 versions", + "not ie <= 8" + ] + } + } + ] ], - "plugins": [ - "istanbul" - ] + "env": { + "test": { + "plugins": [ + "istanbul" + ] + } + } }, "eslintConfig": { "extends": [ diff --git a/webpack.config.js b/webpack.config.js index 4a2c876..0d9675a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,31 +16,34 @@ module.exports = { extensions: ['.js', '.json', '.vue'] }, entry: './src/index.js', + externals: { + 'accounting-js': 'accounting' + }, output: { path: path.resolve(__dirname, 'dist'), filename: "vue-numeric.min.js", library: 'VueNumeric', libraryTarget: 'umd', - umdNamedDefine: true, + umdNamedDefine: true }, module: { rules: [ { test: /\.vue$/, - loader: 'vue-loader', + loader: 'vue-loader' }, { test: /\.js$/, loader: 'babel-loader', - exclude: path.resolve(__dirname, 'node_modules'), - }, + exclude: path.resolve(__dirname, 'node_modules') + } ] }, plugins: [ - new CleanWebpackPlugin(['./dist']), + new CleanWebpackPlugin(['./dist']) ], devtool: false, performance: { - hints: false, + hints: false } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0711e20..0a7b1f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -471,7 +471,7 @@ babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" -babel-plugin-transform-async-to-generator@^6.24.1: +babel-plugin-transform-async-to-generator@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" dependencies: @@ -491,17 +491,17 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoping@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" -babel-plugin-transform-es2015-classes@^6.24.1: +babel-plugin-transform-es2015-classes@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" dependencies: @@ -515,33 +515,33 @@ babel-plugin-transform-es2015-classes@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-computed-properties@^6.24.1: +babel-plugin-transform-es2015-computed-properties@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-destructuring@^6.22.0: +babel-plugin-transform-es2015-destructuring@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-duplicate-keys@^6.24.1: +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-plugin-transform-es2015-for-of@^6.22.0: +babel-plugin-transform-es2015-for-of@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-function-name@^6.24.1: +babel-plugin-transform-es2015-function-name@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" dependencies: @@ -555,7 +555,7 @@ babel-plugin-transform-es2015-literals@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-modules-amd@^6.24.1: +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" dependencies: @@ -563,6 +563,15 @@ babel-plugin-transform-es2015-modules-amd@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" +babel-plugin-transform-es2015-modules-commonjs@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + babel-plugin-transform-es2015-modules-commonjs@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" @@ -572,7 +581,7 @@ babel-plugin-transform-es2015-modules-commonjs@^6.24.1: babel-template "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-modules-systemjs@^6.24.1: +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" dependencies: @@ -580,7 +589,7 @@ babel-plugin-transform-es2015-modules-systemjs@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-modules-umd@^6.24.1: +babel-plugin-transform-es2015-modules-umd@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" dependencies: @@ -588,14 +597,14 @@ babel-plugin-transform-es2015-modules-umd@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-plugin-transform-es2015-object-super@^6.24.1: +babel-plugin-transform-es2015-object-super@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" dependencies: babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@^6.24.1: +babel-plugin-transform-es2015-parameters@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" dependencies: @@ -606,7 +615,7 @@ babel-plugin-transform-es2015-parameters@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-es2015-shorthand-properties@^6.24.1: +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" dependencies: @@ -619,7 +628,7 @@ babel-plugin-transform-es2015-spread@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-sticky-regex@^6.24.1: +babel-plugin-transform-es2015-sticky-regex@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" dependencies: @@ -633,13 +642,13 @@ babel-plugin-transform-es2015-template-literals@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-typeof-symbol@^6.22.0: +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-unicode-regex@^6.24.1: +babel-plugin-transform-es2015-unicode-regex@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" dependencies: @@ -647,7 +656,7 @@ babel-plugin-transform-es2015-unicode-regex@^6.24.1: babel-runtime "^6.22.0" regexpu-core "^2.0.0" -babel-plugin-transform-exponentiation-operator@^6.24.1: +babel-plugin-transform-exponentiation-operator@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" dependencies: @@ -655,11 +664,11 @@ babel-plugin-transform-exponentiation-operator@^6.24.1: babel-plugin-syntax-exponentiation-operator "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-regenerator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" +babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" dependencies: - regenerator-transform "0.9.11" + regenerator-transform "^0.10.0" babel-plugin-transform-strict-mode@^6.24.1: version "6.24.1" @@ -668,55 +677,40 @@ babel-plugin-transform-strict-mode@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-preset-es2015@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" +babel-preset-env@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4" dependencies: babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" babel-plugin-transform-es2015-arrow-functions "^6.22.0" babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.24.1" - babel-plugin-transform-es2015-classes "^6.24.1" - babel-plugin-transform-es2015-computed-properties "^6.24.1" - babel-plugin-transform-es2015-destructuring "^6.22.0" - babel-plugin-transform-es2015-duplicate-keys "^6.24.1" - babel-plugin-transform-es2015-for-of "^6.22.0" - babel-plugin-transform-es2015-function-name "^6.24.1" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-plugin-transform-es2015-modules-systemjs "^6.24.1" - babel-plugin-transform-es2015-modules-umd "^6.24.1" - babel-plugin-transform-es2015-object-super "^6.24.1" - babel-plugin-transform-es2015-parameters "^6.24.1" - babel-plugin-transform-es2015-shorthand-properties "^6.24.1" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.24.1" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.22.0" - babel-plugin-transform-es2015-unicode-regex "^6.24.1" - babel-plugin-transform-regenerator "^6.24.1" - -babel-preset-es2016@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.24.1.tgz#f900bf93e2ebc0d276df9b8ab59724ebfd959f8b" - dependencies: - babel-plugin-transform-exponentiation-operator "^6.24.1" - -babel-preset-es2017@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1" - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.24.1" - -babel-preset-latest@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.24.1.tgz#677de069154a7485c2d25c577c02f624b85b85e8" - dependencies: - babel-preset-es2015 "^6.24.1" - babel-preset-es2016 "^6.24.1" - babel-preset-es2017 "^6.24.1" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^2.1.2" + invariant "^2.2.2" + semver "^5.3.0" babel-register@^6.26.0: version "6.26.0" @@ -988,6 +982,13 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: caniuse-db "^1.0.30000639" electron-to-chromium "^1.2.7" +browserslist@^2.1.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.4.0.tgz#693ee93d01e66468a6348da5498e011f578f87f8" + dependencies: + caniuse-lite "^1.0.30000718" + electron-to-chromium "^1.3.18" + buffer-xor@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" @@ -1073,6 +1074,10 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: version "1.0.30000710" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000710.tgz#f03614ef04b76ba41232755b7d4e45d7cc1c13b8" +caniuse-lite@^1.0.30000718: + version "1.0.30000735" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000735.tgz#aab44016ef243e215ef43fd1343efd22930842f8" + caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" @@ -1417,6 +1422,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" +cross-env@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.5.tgz#4383d364d9660873dd185b398af3bfef5efffef3" + dependencies: + cross-spawn "^5.1.0" + is-windows "^1.0.0" + cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -1717,6 +1729,10 @@ electron-to-chromium@^1.2.7: version "1.3.17" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.17.tgz#41c13457cc7166c5c15e767ae61d86a8cacdee5d" +electron-to-chromium@^1.3.18: + version "1.3.21" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.21.tgz#a967ebdcfe8ed0083fc244d1894022a8e8113ea2" + elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" @@ -1900,8 +1916,8 @@ eslint-scope@^3.7.1: estraverse "^4.1.1" eslint@^4.6.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.7.1.tgz#849804136953ebe366782f9f8611e2cbd1b54681" + version "4.7.2" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.7.2.tgz#ff6f5f5193848a27ee9b627be3e73fb9cb5e662e" dependencies: ajv "^5.2.0" babel-code-frame "^6.22.0" @@ -2781,6 +2797,10 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-windows@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -4340,9 +4360,9 @@ regenerator-runtime@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" -regenerator-transform@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" dependencies: babel-runtime "^6.18.0" babel-types "^6.19.0"