Commit b9bcf550 authored by JetLu's avatar JetLu Committed by JetLu

🍄

parents
{
"presets": [
["@babel/env", {
"useBuiltIns": "usage",
"modules": "umd"
}]
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-export-default-from",
"@babel/proposal-export-namespace-from",
["@babel/transform-runtime", {
"corejs": 2,
"helpers": false,
"regenerator": true
}]
]
}
\ No newline at end of file
node_modules
package-lock.json
\ No newline at end of file
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.moto=n():t.moto=n()}(window,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=42)}([function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){var e=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(15),o=e(35);t.exports=e(6)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){t.exports=!e(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(31)("wks"),o=e(14),i=e(0).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,n,e){var r=e(47),o=e(22);t.exports=function(t){return r(o(t))}},function(t,n,e){t.exports=!e(33)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r,o,i;o=[n],void 0===(i="function"==typeof(r=function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.linear=function(t){return t},t.easeOut=function(t){return t*(2-t)},t.easeIn=function(t){return Math.pow(t,2)},t.easeInOut=function(t){return(t*=2)<1?.5*Math.pow(t,2):.5*(1- --t*(t-2))}})?r.apply(n,o):r)||(t.exports=i)},function(t,n){var e=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=e)},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n,e){var r=e(16),o=e(66),i=e(67),u=Object.defineProperty;n.f=e(6)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(17);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports={}},function(t,n,e){var r=e(69),o=e(36);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(0),o=e(2),i=e(7),u=e(14)("src"),c=Function.toString,f=(""+c).split("toString");e(13).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,e,c){var a="function"==typeof e;a&&(i(e,"name")||o(e,"name",n)),t[n]!==e&&(a&&(i(e,u)||o(e,u,t[n]?""+t[n]:f.join(String(n)))),t===r?t[n]=e:c?t[n]?t[n]=e:o(t,n,e):(delete t[n],o(t,n,e)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,n,e){var r=e(31)("keys"),o=e(14);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(8);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){t.exports=!e(3)&&!e(10)(function(){return 7!=Object.defineProperty(e(51)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(27),o=e(1),i=e(10);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",u)}},function(t,n,e){var r=e(11),o=e(1),i=e(52),u=e(54),c=e(9),f=function(t,n,e){var a,s,p,l=t&f.F,v=t&f.G,y=t&f.S,h=t&f.P,d=t&f.B,x=t&f.W,m=v?o:o[n]||(o[n]={}),g=m.prototype,b=v?r:y?r[n]:(r[n]||{}).prototype;for(a in v&&(e=n),e)(s=!l&&b&&void 0!==b[a])&&c(m,a)||(p=s?b[a]:e[a],m[a]=v&&"function"!=typeof b[a]?e[a]:d&&s?i(p,r):x&&b[a]==p?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(p):h&&"function"==typeof p?i(Function.call,p):p,h&&((m.virtual||(m.virtual={}))[a]=p,t&f.R&&g&&!g[a]&&u(g,a,p)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n,e){var r=e(55),o=e(25),i=e(24),u=Object.defineProperty;n.f=e(3)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n){!function(n){"use strict";var e,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",f=i.toStringTag||"@@toStringTag",a="object"==typeof t,s=n.regeneratorRuntime;if(s)a&&(t.exports=s);else{(s=n.regeneratorRuntime=a?t.exports:{}).wrap=b;var p="suspendedStart",l="suspendedYield",v="executing",y="completed",h={},d={};d[u]=function(){return this};var x=Object.getPrototypeOf,m=x&&x(x(k([])));m&&m!==r&&o.call(m,u)&&(d=m);var g=j.prototype=O.prototype=Object.create(d);_.prototype=g.constructor=j,j.constructor=_,j[f]=_.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===_||"GeneratorFunction"===(n.displayName||n.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,f in t||(t[f]="GeneratorFunction")),t.prototype=Object.create(g),t},s.awrap=function(t){return{__await:t}},S(P.prototype),P.prototype[c]=function(){return this},s.AsyncIterator=P,s.async=function(t,n,e,r){var o=new P(b(t,n,e,r));return s.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},S(g),g[f]="Generator",g[u]=function(){return this},g.toString=function(){return"[object Generator]"},s.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},s.values=k,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],c=u.completion;if("root"===u.tryLoc)return r("end");if(u.tryLoc<=this.prev){var f=o.call(u,"catchLoc"),a=o.call(u,"finallyLoc");if(f&&a){if(this.prev<u.catchLoc)return r(u.catchLoc,!0);if(this.prev<u.finallyLoc)return r(u.finallyLoc)}else if(f){if(this.prev<u.catchLoc)return r(u.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return r(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=n,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),E(e),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;E(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:k(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}}}function b(t,n,e,r){var o=n&&n.prototype instanceof O?n:O,i=Object.create(o.prototype),u=new T(r||[]);return i._invoke=function(t,n,e){var r=p;return function(o,i){if(r===v)throw new Error("Generator is already running");if(r===y){if("throw"===o)throw i;return F()}for(e.method=o,e.arg=i;;){var u=e.delegate;if(u){var c=L(u,e);if(c){if(c===h)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===p)throw r=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=v;var f=w(t,n,e);if("normal"===f.type){if(r=e.done?y:l,f.arg===h)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(r=y,e.method="throw",e.arg=f.arg)}}}(t,e,u),i}function w(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}function O(){}function _(){}function j(){}function S(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this._invoke(n,t)}})}function P(t){var n;this._invoke=function(e,r){function i(){return new Promise(function(n,i){!function n(e,r,i,u){var c=w(t[e],t,r);if("throw"!==c.type){var f=c.arg,a=f.value;return a&&"object"==typeof a&&o.call(a,"__await")?Promise.resolve(a.__await).then(function(t){n("next",t,i,u)},function(t){n("throw",t,i,u)}):Promise.resolve(a).then(function(t){f.value=t,i(f)},function(t){return n("throw",t,i,u)})}u(c.arg)}(e,r,n,i)})}return n=n?n.then(i,i):i()}}function L(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=w(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function M(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function E(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function k(t){if(t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:F}}function F(){return{value:e,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(t,n,e){"use strict";var r=e(65),o=e(68),i=e(18),u=e(19);t.exports=e(71)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):o(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n,e){var r=e(13),o=e(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,n){return i[t]||(i[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(32)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=!1},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(17),o=e(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(78),o=e(39);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(15).f,o=e(7),i=e(4)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){t.exports=e(43)},function(t,n,e){var r,o,i,u=e(44),c=e(56);o=[n,e(12),e(59),e(64)],void 0===(i="function"==typeof(r=function(t,n,e,r){"use strict";function o(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=c&&u?u(t,e):{};r.get||r.set?c(n,e,r):n[e]=t[e]}return n.default=t,n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"tween",{enumerable:!0,get:function(){return r.default}}),t.curve=t.easing=void 0,n=o(n),t.easing=n,e=o(e),t.curve=e,r=function(t){return t&&t.__esModule?t:{default:t}}(r)})?r.apply(n,o):r)||(t.exports=i)},function(t,n,e){t.exports=e(45)},function(t,n,e){e(46);var r=e(1).Object;t.exports=function(t,n){return r.getOwnPropertyDescriptor(t,n)}},function(t,n,e){var r=e(5),o=e(49).f;e(26)("getOwnPropertyDescriptor",function(){return function(t,n){return o(r(t),n)}})},function(t,n,e){var r=e(48);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(50),o=e(23),i=e(5),u=e(24),c=e(9),f=e(25),a=Object.getOwnPropertyDescriptor;n.f=e(3)?a:function(t,n){if(t=i(t),n=u(n,!0),f)try{return a(t,n)}catch(t){}if(c(t,n))return o(!r.f.call(t,n),t[n])}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(8),o=e(11).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){var r=e(53);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(28),o=e(23);t.exports=e(3)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=e(57)},function(t,n,e){e(58);var r=e(1).Object;t.exports=function(t,n,e){return r.defineProperty(t,n,e)}},function(t,n,e){var r=e(27);r(r.S+r.F*!e(3),"Object",{defineProperty:e(28).f})},function(t,n,e){var r,o,i;o=[n,e(60),e(61)],void 0===(i="function"==typeof(r=function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bezier",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"catmullRom",{enumerable:!0,get:function(){return e.default}}),n=r(n),e=r(e)})?r.apply(n,o):r)||(t.exports=i)},function(t,n,e){var r,o,i;o=[n,e(12)],void 0===(i="function"==typeof(r=function(t,n){"use strict";function e(t,n,e,r){return Math.pow(1-r,2)*t+2*(1-r)*r*n+Math.pow(r,2)*e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var r=t.p1,o=t.p2,i=t.p3,u=t.duration,c=void 0===u?1:u,f=t.ease,a=void 0===f?n.linear:f;return{start:function(t){var n,u,f,s=0;return t instanceof Function?u=t:(u=t.update,f=t.complete),function t(){(s+=1/60/c)>1&&(s=1),u(function(t,n,r,o){return{x:e(t.x,n.x,r.x,o),y:e(t.y,n.y,r.y,o)}}(r,o,i,a(s))),1===s?f&&f():n=requestAnimationFrame(t)}(),{stop:function(){cancelAnimationFrame(n)}}}}}})?r.apply(n,o):r)||(t.exports=i)},function(t,n,e){var r,o,i;o=[n,e(62),e(29)],void 0===(i="function"==typeof(r=function(t,n,e){"use strict";function r(t,n){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function o(t,n,e,r,o){var u=[Math.pow(o,3),Math.pow(o,2),o,1],c=[[-.5,1.5,-1.5,.5],[1,-2.5,2,-.5],[-.5,0,.5,0],[0,1,0,0]],f=[t,n,e,r];return i(u.map(function(t,n){return i(u,c.map(function(t,e){return c[e][n]}))}),f)}function i(t,n){return t.map(function(t,e){return t*n[e]}).reduce(function(t,n){return t+n})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return t.unshift(t[0]),t.push(t[t.length-1]),{start:function(i){var u,c,f,a=n.default.mark(p),s=0;function p(){var o;return n.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:o=0;case 1:if(!(o+3<t.length)){n.next=7;break}return n.next=4,{p1:t[o],p2:t[o+1],p3:t[o+2],p4:t[o+3],delta:e/r(t[o+1],t[o+2])};case 4:o++,n.next=1;break;case 7:case"end":return n.stop()}},a,this)}i instanceof Function?c=i:(c=i.update,f=i.complete);var l=p(),v=l.next().value,y=v.p1,h=v.p2,d=v.p3,x=v.p4,m=v.delta;return function t(){if((s+=m)>1&&(s=1),c(function(t,n,e,r,i){return{x:o(t.x,n.x,e.x,r.x,i),y:o(t.y,n.y,e.y,r.y,i)}}(y,h,d,x,s)),1===s){var n=l.next(),e=n.value;n.done?f&&f():(y=e.p1,h=e.p2,d=e.p3,x=e.p4,m=e.delta,s=0,u=requestAnimationFrame(t))}else u=requestAnimationFrame(t)}(),{stop:function(){cancelAnimationFrame(u)}}}}},n=function(t){return t&&t.__esModule?t:{default:t}}(n)})?r.apply(n,o):r)||(t.exports=i)},function(t,n,e){t.exports=e(63)},function(t,n,e){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=e(29),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,n,e){var r,o,i;e(30),o=[n,e(85),e(99),e(12)],void 0===(i="function"==typeof(r=function(t,n,e,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var e=t.from,o=t.to,i=t.duration,u=void 0===i?1:i,c=t.ease,f=void 0===c?r.linear:c;return{start:function(t){var r,i,c,a,s,p=isNaN(e),l=0;return p?(a={},s={},(0,n.default)(e).forEach(function(t){a[t]=o[t]-e[t]})):a=o-e,t instanceof Function?r=t:(r=t.update,i=t.complete),function t(){if((l+=1/60/u)>1&&(l=1),p)for(var n in a)s[n]=e[n]+a[n]*f(l);else s=e+a*f(l);r(s),1===l?i&&i():c=requestAnimationFrame(t)}(),{stop:function(){cancelAnimationFrame(c)}}}}},n=function(t){return t&&t.__esModule?t:{default:t}}(n)})?r.apply(n,o):r)||(t.exports=i)},function(t,n,e){var r=e(4)("unscopables"),o=Array.prototype;void 0==o[r]&&e(2)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,n,e){t.exports=!e(6)&&!e(33)(function(){return 7!=Object.defineProperty(e(34)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(17);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){var r=e(70);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){"use strict";var r=e(32),o=e(72),i=e(20),u=e(2),c=e(18),f=e(75),a=e(40),s=e(83),p=e(4)("iterator"),l=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,n,e,y,h,d,x){f(e,n,y);var m,g,b,w=function(t){if(!l&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},O=n+" Iterator",_="values"==h,j=!1,S=t.prototype,P=S[p]||S["@@iterator"]||h&&S[h],L=P||w(h),M=h?_?w("entries"):L:void 0,E="Array"==n&&S.entries||P;if(E&&(b=s(E.call(new t)))!==Object.prototype&&b.next&&(a(b,O,!0),r||"function"==typeof b[p]||u(b,p,v)),_&&P&&"values"!==P.name&&(j=!0,L=function(){return P.call(this)}),r&&!x||!l&&!j&&S[p]||u(S,p,L),c[n]=L,c[O]=v,h)if(m={values:_?L:w("values"),keys:d?L:w("keys"),entries:M},x)for(g in m)g in S||i(S,g,m[g]);else o(o.P+o.F*(l||j),n,m);return m}},function(t,n,e){var r=e(0),o=e(13),i=e(2),u=e(20),c=e(73),f=function(t,n,e){var a,s,p,l,v=t&f.F,y=t&f.G,h=t&f.S,d=t&f.P,x=t&f.B,m=y?r:h?r[n]||(r[n]={}):(r[n]||{}).prototype,g=y?o:o[n]||(o[n]={}),b=g.prototype||(g.prototype={});for(a in y&&(e=n),e)p=((s=!v&&m&&void 0!==m[a])?m:e)[a],l=x&&s?c(p,r):d&&"function"==typeof p?c(Function.call,p):p,m&&u(m,a,p,t&f.U),g[a]!=p&&i(g,a,l),d&&b[a]!=p&&(b[a]=p)};r.core=o,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n,e){var r=e(74);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){"use strict";var r=e(76),o=e(35),i=e(40),u={};e(2)(u,e(4)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(u,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n,e){var r=e(16),o=e(77),i=e(39),u=e(21)("IE_PROTO"),c=function(){},f=function(){var t,n=e(34)("iframe"),r=i.length;for(n.style.display="none",e(82).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;r--;)delete f.prototype[i[r]];return f()};t.exports=Object.create||function(t,n){var e;return null!==t?(c.prototype=r(t),e=new c,c.prototype=null,e[u]=t):e=f(),void 0===n?e:o(e,n)}},function(t,n,e){var r=e(15),o=e(16),i=e(37);t.exports=e(6)?Object.defineProperties:function(t,n){o(t);for(var e,u=i(n),c=u.length,f=0;c>f;)r.f(t,e=u[f++],n[e]);return t}},function(t,n,e){var r=e(7),o=e(19),i=e(79)(!1),u=e(21)("IE_PROTO");t.exports=function(t,n){var e,c=o(t),f=0,a=[];for(e in c)e!=u&&r(c,e)&&a.push(e);for(;n.length>f;)r(c,e=n[f++])&&(~i(a,e)||a.push(e));return a}},function(t,n,e){var r=e(19),o=e(80),i=e(81);t.exports=function(t){return function(n,e,u){var c,f=r(n),a=o(f.length),s=i(u,a);if(t&&e!=e){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===e)return t||s||0;return!t&&-1}}},function(t,n,e){var r=e(38),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(38),o=Math.max,i=Math.min;t.exports=function(t,n){return(t=r(t))<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(0).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(7),o=e(84),i=e(21)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(36);t.exports=function(t){return Object(r(t))}},function(t,n,e){t.exports=e(86)},function(t,n,e){e(87),t.exports=e(1).Object.keys},function(t,n,e){var r=e(88),o=e(89);e(26)("keys",function(){return function(t){return o(r(t))}})},function(t,n,e){var r=e(22);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(90),o=e(98);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){var r=e(9),o=e(5),i=e(91)(!1),u=e(94)("IE_PROTO");t.exports=function(t,n){var e,c=o(t),f=0,a=[];for(e in c)e!=u&&r(c,e)&&a.push(e);for(;n.length>f;)r(c,e=n[f++])&&(~i(a,e)||a.push(e));return a}},function(t,n,e){var r=e(5),o=e(92),i=e(93);t.exports=function(t){return function(n,e,u){var c,f=r(n),a=o(f.length),s=i(u,a);if(t&&e!=e){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===e)return t||s||0;return!t&&-1}}},function(t,n,e){var r=e(41),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(41),o=Math.max,i=Math.min;t.exports=function(t,n){return(t=r(t))<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(95)("keys"),o=e(97);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(1),o=e(11),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,n){return i[t]||(i[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(96)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=!0},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){for(var r=e(30),o=e(37),i=e(20),u=e(0),c=e(2),f=e(18),a=e(4),s=a("iterator"),p=a("toStringTag"),l=f.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},y=o(v),h=0;h<y.length;h++){var d,x=y[h],m=v[x],g=u[x],b=g&&g.prototype;if(b&&(b[s]||c(b,s,l),b[p]||c(b,p,x),f[x]=l,m))for(d in r)b[d]||i(b,d,r[d],!0)}}])});
\ No newline at end of file
{
"name": "moto",
"version": "1.0.0",
"description": "",
"main": "dist/moto.min.js",
"browserslist": [
"ios >= 8",
"android >= 4"
],
"scripts": {
"dev": "webpack-dev-server --config webpack.dev.js --host 0.0.0.0",
"build": "webpack -p",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "JetLu",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/runtime": "^7.0.0",
"@babel/runtime-corejs2": "^7.1.2",
"babel-loader": "^8.0.2",
"core-js": "^2.5.7",
"css-loader": "^1.0.0",
"html-webpack-plugin": "^3.2.0",
"less": "^3.8.1",
"less-loader": "^4.1.0",
"style-loader": "^0.23.0",
"webpack": "^4.20.2",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.7"
}
}
## Moto
> 曲线运动库,设计灵感来自`Popmotion`。
## 使用
```bash
# 开发
npm run dev
# 打包
npm run build
# 直接引用
npm i git+ssh://git@gitlab2.dui88.com:lufei/moto.git
```
## 文档
```js
import {curve, tween, easing} from 'moto'
curve.bezier({
p1: {x: 0, y: 0},
p2: {x: 50, y: 50},
p3: {x: 100, y: 0},
duration: 3, // 可选
ease: easing.easeInOut // 时间函数,可选
}).start(v => {
console.log(v)
})
curve.catmullRom(
[{x: 0, y: 0}, {x: 50, y: 50}, {x: 100, y: 0}],
8 // 运动速度,可选
).start({
update: v => console.log(v)
complete: () => {}
})
const anime = tween({
from: {x: 0, scale: 1},
to: {x: 100, scale: 2},
duration: 5, // 可选
ease: easing.linear // 可选
}).start({
update: v => console.log(v),
complete: () => {}
})
setTimeout(() => anime.stop(), 2e3)
```
**`curve.bezier(options)`**
options`{object}`:
- p1: 起始点 `{x, y}`
- p2: 控制点 `{x, y}`
- p3: 结束点 `{x, y}`
- duration: 动画持续时间(单位:`s`),默认 `1`
- ease: 时间函数,默认 `easing.linear`
**`curve.catmullRom(points, [v])`**
- points: 路径点数组 `[{x, y}...]`
- v: 运动速度,默认 `10`
**`tween(options)`**
options`{object}`:
- from: 初始值`{number||object}`
- to: 结束值`{number||object}`
- duration: 动画持续时间(单位:`s`),默认 `1`
- ease: 时间函数,默认 `easing.linear`
以上函数都返回一个`object`:
**`start({function} || {object})`**
- update:
- v: 当前值
- complete:
import {curve, easing, tween} from './core'
HTMLElement.prototype.on = function(...args) {
this.addEventListener(...args)
return this
}
const player = document.querySelector('.player')
document.body.on('pointerdown', ev => {
const target = ev.target
if (target.classList.contains('dot')) {
target.remove()
} else if (target === document.body) {
const
dot = document.createElement('div'),
{pageX: x, pageY: y} = ev
dot.classList.add('dot')
dot.style.top = `${y}px`
dot.style.left = `${x}px`
dot.dataset.position = JSON.stringify({x, y})
document.body.appendChild(dot)
} else if (target.classList.contains('btn-run')) {
target.classList.contains('bezier') && run('bezier')
target.classList.contains('catmull-rom') && run('catmullRom')
target.classList.contains('tween') && run('tween')
} else if (target.classList.contains('btn-clear')) {
clear()
}
})
async function run(action) {
const dots = document.querySelectorAll('.dot')
document.querySelectorAll('.mini-dot').forEach(child => child.remove())
player.setAttribute('style', '')
if (action === 'bezier') {
if (dots.length < 2) return alert('至少 2 个点吧!')
const points = Array.prototype.map.call(dots, dot => JSON.parse(dot.dataset.position))
curve.bezier({
p1: {x: player.offsetLeft, y: player.offsetTop},
p2: points[0],
p3: points[1],
duration: 1,
ease: easing.easeInOut
}).start(trace)
} else if (action === 'catmullRom') {
if (dots.length < 1) return alert('至少 1 个点吧!')
const points = Array.prototype.map.call(dots, dot => JSON.parse(dot.dataset.position))
points.unshift({x: player.offsetLeft, y: player.offsetTop})
curve.catmullRom(points).start(trace)
} else if (action === 'tween') {
if (dots.length < 1) return alert('至少 1 个点吧!')
const points = Array.prototype.map.call(dots, dot => JSON.parse(dot.dataset.position))
tween({
from: {x: player.offsetLeft, y: player.offsetTop, scale: 1},
to: {...points[0], scale: 3},
duration: 1,
ease: easing.easeInOut
}).start(trace)
}
}
function trace(v) {
player.style.left = `${v.x}px`
player.style.top = `${v.y}px`
player.style.transform = `translate(-50%, -50%) scale(${v.scale})`
const dot = document.createElement('i')
dot.classList.add('mini-dot')
dot.style.left = player.style.left
dot.style.top = player.style.top
document.body.appendChild(dot)
}
function clear() {
document.querySelectorAll('.dot').forEach(child => child.remove())
document.querySelectorAll('.mini-dot').forEach(child => child.remove())
player.setAttribute('style', '')
}
function distance(a, b) {
return Math.sqrt((a.x - b.x) ** 2 + (a.y - b.y) ** 2)
}
import {linear} from '../easing'
export default function(option) {
const {p1, p2, p3, duration = 1, ease = linear} = option
function start(option) {
let id, update, complete, t = 0
if (option instanceof Function) update = option
else ({update, complete} = option)
!function loop() {
t += 1 / 60 / duration
t > 1 ? t = 1 : null
update(bezier(p1, p2, p3, ease(t)))
t === 1 ? complete && complete() : id = requestAnimationFrame(loop)
}()
return {
stop() {
cancelAnimationFrame(id)
}
}
}
return {start}
}
function bezier(p1, p2, p3, t) {
return {
x: calc(p1.x, p2.x, p3.x, t),
y: calc(p1.y, p2.y, p3.y, t)
}
}
function calc(p1, p2, p3, t) {
return (1 - t) ** 2 * p1 + 2 * (1 - t) * t * p2 + t ** 2 * p3
}
\ No newline at end of file
export default function(points, v=10) {
/* catmull rom 不会连接首尾点 */
points.unshift(points[0])
points.push(points[points.length - 1])
function start(option) {
let id, update, complete,
t = 0
if (option instanceof Function) update = option
else ({update, complete} = option)
function* generate() {
for (let i = 0; i + 3 < points.length; i++) {
yield {
p1: points[i],
p2: points[i + 1],
p3: points[i + 2],
p4: points[i + 3],
delta: v / distance(points[i + 1], points[i + 2])
}
}
}
const iterator = generate()
let {p1, p2, p3, p4, delta} = iterator.next().value
!function loop() {
t += delta
t > 1 ? t = 1 : null
update(catmullRom(p1, p2, p3, p4, t))
if (t === 1) {
const {value, done} = iterator.next()
if (done) complete && complete()
else {
({p1, p2, p3, p4, delta} = value)
t = 0
id = requestAnimationFrame(loop)
}
} else id = requestAnimationFrame(loop)
}()
return {
stop() {
cancelAnimationFrame(id)
}
}
}
return {start}
}
function distance(p1, p2) {
return Math.sqrt((p1.x - p2.x) ** 2 + (p1.y - p2.y) ** 2)
}
function catmullRom(p1, p2, p3, p4, t) {
return {
x: calc(p1.x, p2.x, p3.x, p4.x, t),
y: calc(p1.y, p2.y, p3.y, p4.y, t)
}
}
function calc(p1, p2, p3, p4, t) {
const
a = [t ** 3, t ** 2, t, 1],
b = [[-.5, 1.5, -1.5, .5], [1, -2.5, 2, -.5], [-.5, 0, .5, 0], [0, 1, 0, 0]],
c = [p1, p2, p3, p4]
return multiply(
a.map((_, i) => multiply(a, b.map((_, j) => b[j][i]))),
c
)
}
function multiply(a, b) {
return a.map((item, i) => item * b[i])
.reduce((total, current) => total + current)
}
\ No newline at end of file
export bezier from './bezier'
export catmullRom from './catmullRom'
\ No newline at end of file
export function linear(t) {
return t
}
export function easeOut(t) {
return t * (2 - t)
}
export function easeIn(t) {
return t ** 2
}
export function easeInOut(t) {
t *= 2
if (t < 1) return .5 * t ** 2
t--
return .5 * (1 - t * (t - 2))
}
\ No newline at end of file
export * as easing from './easing'
export * as curve from './curve'
export tween from './tween'
import {linear} from './easing'
export default function(option) {
const {from, to, duration = 1, ease = linear} = option
function start(option) {
const complex = isNaN(from)
let update, complete, id, delta, result,
t = 0
complex ? (delta = {}, result = {}, Object.keys(from).forEach(key => {
delta[key] = to[key] - from[key]
})) : delta = to - from
if (option instanceof Function) update = option
else ({update, complete} = option)
!function loop() {
t += 1 / 60 / duration
t > 1 ? t = 1 : null
if (complex) for (const key in delta) {
result[key] = from[key] + delta[key] * ease(t)
} else result = from + delta * ease(t)
update(result)
t === 1 ? complete && complete() : id = requestAnimationFrame(loop)
}()
return {
stop() {
cancelAnimationFrame(id)
}
}
}
return {start}
}
\ No newline at end of file
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
body {
position: relative;
.player {
@size: 4rem;
position: absolute;
width: @size;
height: @size;
border-radius: @size / 2;
background-color: #fc3;
top: 50%;
left: @size;
transform: translate(-50%, -50%);
}
.dot {
@size: 1rem;
width: @size;
height: @size;
border-radius: @size / 2;
background-color: #f3c;
position: absolute;
transform: translate(-50%, -50%);
}
.mini-dot {
@size: .5rem;
width: @size;
height: @size;
border-radius: @size / 2;
background-color: #6cffb5;
position: absolute;
transform: translate(-50%, -50%);
}
}
.btn-group {
display: flex;
button {
// -webkit-appearance: none;
border: none;
color: #fff;
background-color: #007BFF;
font-size: 1rem;
padding: .5rem 1rem;
border-radius: .3rem;
margin-right: 1rem;
cursor: pointer;
}
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Curve</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdnjs.cloudflare.com/ajax/libs/eruda/1.4.4/eruda.min.js"></script>
<script>//eruda.init()</script>
</head>
<body>
<div class="player"></div>
<section class="btn-group">
<button class="btn-clear">Clear</button>
<button class="btn-run bezier">Bezier</button>
<button class="btn-run catmull-rom">CatmullRom</button>
<button class="btn-run tween">Tween</button>
</section>
</body>
</html>
\ No newline at end of file
const
path = require('path'),
webpack = require('webpack')
module.exports = {
entry: [
'./src/core/index.js'
],
output: {
path: path.resolve('dist'),
filename: 'moto.min.js',
libraryTarget: 'umd',
library: 'moto'
},
stats: 'errors-only',
devtool: false,
module: {
rules: [
{
test: /\.js$/,
use: ['babel-loader'],
exclude: /node_modules/
}
]
},
mode: 'production'
}
\ No newline at end of file
const
path = require('path'),
htmlWebpackPlugin = require('html-webpack-plugin'),
webpack = require('webpack')
const isProd = process.env.NODE_ENV === 'production'
module.exports = {
entry: [
'./src/index.less',
'./src/app.js'
],
output: {
path: path.resolve('dist'),
filename: 'game.js'
},
devServer: {
hot: true,
contentBase: '.',
stats: 'errors-only'
},
stats: 'errors-only',
devtool: isProd ? false : 'source-map',
module: {
rules: [
{
test: /\.js$/,
use: ['babel-loader'],
exclude: /node_modules/
},
{
test: /\.less$/,
use: ['style-loader', 'css-loader', 'less-loader']
}
]
},
plugins: [
new htmlWebpackPlugin({
template: './src/template.html',
hash: true,
filename: 'index.html',
inject: 'body',
minify: {
collapseWhitespace: true
}
}),
new webpack.NamedModulesPlugin(),
new webpack.HotModuleReplacementPlugin()
],
mode: isProd ? 'production' : 'development'
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment