mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
use prompts dep
This commit is contained in:
1 parent
8a1546f9dd
commit
bc838bf0f2
6 files changed
+42
-28
No files matched your search
@@ -242,7 +242,7 @@ class Artplayer extends _emitterDefault.default {
|
||||
return "development";
|
||||
}
|
||||
static get build() {
|
||||
return "1651241621264";
|
||||
return "1651278058088";
|
||||
}
|
||||
static get config() {
|
||||
return _configDefault.default;
|
||||
|
||||
+1
-1
@@ -40,12 +40,12 @@
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.14.0",
|
||||
"glob": "^8.0.1",
|
||||
"inquirer": "^8.2.3",
|
||||
"lerna": "^4.0.0",
|
||||
"mocha": "^9.2.2",
|
||||
"mocha-chrome": "^2.2.0",
|
||||
"node-html-parser": "^5.3.3",
|
||||
"prettier": "^2.6.2",
|
||||
"prompts": "^2.4.2",
|
||||
"servor": "^4.0.2",
|
||||
"workbox-build": "^6.5.3"
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(t,e,n,i,r){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof s.parcelRequire4dc0&&s.parcelRequire4dc0,a=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!a[e]){if(!t[e]){var i="function"==typeof s.parcelRequire4dc0&&s.parcelRequire4dc0;if(!n&&i)return i(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}h.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},h.cache={};var p=a[e]=new u.Module(e);t[e][0].call(p.exports,h,p,p.exports,this)}return a[e].exports;function h(t){var e=h.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=a,u.parent=o,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return s.parcelRequire4dc0}}),s.parcelRequire4dc0=u;for(var p=0;p<e.length;p++)u(e[p]);var h=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=h:"function"==typeof define&&define.amd&&define((function(){return h}))}({b8ouu:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),s=i.interopDefault(r);function o(t){return e=>{const n=new s.default(e,t);return{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),get isHide(){return n.isHide}}}}n.default=o,window.artplayerPluginDanmuku=o},{"./danmuku":"b4AW0","@parcel/transformer-js/src/esmodule-helpers.js":"fRZO2"}],b4AW0:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./i18n"),s=i.interopDefault(r),o=t("./utils"),a=t("./bilibili"),l=t("./getDanmuTop"),u=i.interopDefault(l);class p{constructor(t,e){t.i18n.update(s.default),this.art=t,this.queue=[],this.option={},this.config(e),this.isStop=!1,this.isHide=!1,this.animationFrameTimer=null,this.$danmuku=t.template.$danmuku,t.on("video:play",this.start.bind(this)),t.on("video:playing",this.start.bind(this)),t.on("video:pause",this.stop.bind(this)),t.on("video:waiting",this.stop.bind(this)),t.on("resize",this.resize.bind(this)),t.on("destroy",this.stop.bind(this)),this.load()}static get option(){return{danmuku:[],speed:5,maxlength:50,margin:[10,100],opacity:1,fontSize:25,synchronousPlayback:!1}}static get scheme(){return{danmuku:"array|function|string",speed:"number",maxlength:"number",margin:"array",opacity:"number",fontSize:"number",synchronousPlayback:"boolean"}}load(){return"function"==typeof this.option.danmuku?this.option.danmuku().then((t=>{this.queue=[],this.$danmuku.innerText="",t.forEach(this.emit.bind(this)),this.art.emit("artplayerPluginDanmuku:loaded")})):"string"==typeof this.option.danmuku?a.bilibiliDanmuParseFromUrl(this.option.danmuku).then((t=>{this.queue=[],this.$danmuku.innerText="",t.forEach(this.emit.bind(this)),this.art.emit("artplayerPluginDanmuku:loaded")})):(this.queue=[],this.$danmuku.innerText="",this.option.danmuku.forEach(this.emit.bind(this)),this.art.emit("artplayerPluginDanmuku:loaded")),this}config(t){const{utils:{clamp:e},validator:n}=this.art.constructor;return this.option=Object.assign({},p.option,this.option,t),n(this.option,p.scheme),this.option.speed=e(this.option.speed,1,10),this.option.maxlength=e(this.option.maxlength,10,100),this.option.margin[0]=e(this.option.margin[0],0,100),this.option.margin[1]=e(this.option.margin[1],0,100),this.option.opacity=e(this.option.opacity,0,1),this.option.fontSize=e(this.option.fontSize,12,30),this.art.emit("artplayerPluginDanmuku:config",this.option),this}continue(){return o.filter(this.queue,"stop",(t=>{if(t.$state="emit",t.$lastStartTime=Date.now(),0===t.mode)t.$ref.style.transform=`translateX(${-t.$restWidth}px) translateY(0px) translateZ(0px)`,t.$ref.style.transition=`transform ${t.$restTime}s linear 0s`})),this}suspend(){const{$player:t}=this.art.template;return o.filter(this.queue,"emit",(e=>{switch(e.$state="stop",e.mode){case 0:{const{left:n,width:i}=o.getRect(t),{left:r}=o.getRect(e.$ref),s=i-(r-n)+5;e.$ref.style.transform=`translateX(${-s}px) translateY(0px) translateZ(0px)`,e.$ref.style.transition="transform 0s linear 0s";break}}})),this}resize(){const{$player:t}=this.art.template,e=o.getRect(t,"width");return o.filter(this.queue,"wait",(t=>{t.$ref&&(t.$ref.style.border="none",t.$ref.style.left=`${e}px`,t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px) translateY(0px) translateZ(0px)",t.$ref.style.transition="transform 0s linear 0s")})),this}update(){const{$player:t}=this.art.template;return this.animationFrameTimer=window.requestAnimationFrame((()=>{if(this.art.playing&&!this.isHide){const e=o.getRect(t,"width");o.filter(this.queue,"emit",(t=>{t.$restTime-=(Date.now()-t.$lastStartTimLine truncated
|
||||
!function(t,e,i,r,n){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf,o=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,i){if(!o[e]){if(!t[e]){var r="function"==typeof s.parcelRequire93cf&&s.parcelRequire93cf;if(!i&&r)return r(e,!0);if(a)return a(e,!0);if(l&&"string"==typeof e)return l(e);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}h.resolve=function(i){var r=t[e][1][i];return null!=r?r:i},h.cache={};var f=o[e]=new u.Module(e);t[e][0].call(f.exports,h,f,f.exports,this)}return o[e].exports;function h(t){var e=h.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=o,u.parent=a,u.register=function(e,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(u,"root",{get:function(){return s.parcelRequire93cf}}),s.parcelRequire93cf=u;for(var f=0;f<e.length;f++)u(e[f]);var h=u(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=h:"function"==typeof define&&define.amd&&define((function(){return h}))}({E13ST:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./danmuku"),s=r.interopDefault(n);function a(t){return e=>{const i=new s.default(e,t);return{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),get isHide(){return i.isHide}}}}i.default=a,window.artplayerPluginDanmuku=a},{"./danmuku":"8Gtnh","@parcel/transformer-js/src/esmodule-helpers.js":"b7MJY"}],"8Gtnh":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./i18n"),s=r.interopDefault(n),a=t("./bilibili"),o=t("./getDanmuTop"),l=r.interopDefault(o);class u{constructor(t,e){t.i18n.update(s.default),this.art=t,this.utils=t.constructor.utils,this.validator=t.constructor.validator,this.queue=[],this.option={},this.config(e),this.isStop=!1,this.isHide=!1,this.animationFrameTimer=null,this.$danmuku=t.template.$danmuku,t.on("video:play",this.start.bind(this)),t.on("video:playing",this.start.bind(this)),t.on("video:pause",this.stop.bind(this)),t.on("video:waiting",this.stop.bind(this)),t.on("resize",this.resize.bind(this)),t.on("destroy",this.stop.bind(this)),t.on("fullscreen",this.reset.bind(this)),t.on("fullscreenWeb",this.reset.bind(this)),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,100],opacity:1,fontSize:25,filter:()=>!0,synchronousPlayback:!1}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",fontSize:"number",filter:"function",synchronousPlayback:"boolean"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[0];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return u.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,{$player:e}=this.art.template,i=this.option.margin[1];if("number"==typeof i)return t(i,0,e.clientHeight);if("string"==typeof i&&i.endsWith("%")){const r=parseFloat(i)/100;return t(e.clientHeight*r,0,e.clientHeight)}return u.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getRect(t,e){const i=t.getBoundingClientRect(),r=i.bottom,n=i.height,s=i.left,a=i.right,o=i.top,l=i.width,u=i.x,f=i.y,h={bottom:r,height:n,left:s,right:a,top:o,width:l,x:u,y:f};return this.isRotate&&(h.bottom=s,h.left=o,h.top=a,h.right=r,h.height=l,h.width=n,h.x=f,h.y=u),e?h[e]:h}getDanmuRef(){const t=this.queue.find((t=>t.$ref&&"wait"===t.$state));if(t){const{$ref:e}=t;return t.$ref=null,e}const e=document.createElement("div");return e.style.cssText='\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n font-weight: normal;\n line-height: 1.125;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}async load(){this.queue=[],this.$danmuku.innerText="";let t=[];try{t="function"==typeof this.option.danmuku?await this.option.danmuku():"function"==typeof this.option.danmuku.then?await this.option.danmuku:"string"==typeof this.option.danmuku?await a.bilibiliDanmuParseFromUrl(this.option.danmuku):this.option.danmuku,this.utils.errorHandle(Array.isArray(t),"Danmuku need return an array as result"),this.artLine truncated
|
||||
Vendored
+1
-1
@@ -4,4 +4,4 @@
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof n.parcelRequire4dc0&&n.parcelRequire4dc0,a=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!a[t]){if(!e[t]){var o="function"==typeof n.parcelRequire4dc0&&n.parcelRequire4dc0;if(!r&&o)return o(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=a[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return a[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=a,c.parent=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequire4dc0}}),n.parcelRequire4dc0=c;for(var p=0;p<t.length;p++)c(t[p]);var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({"6SN6P":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),n=o.interopDefault(i),s=e("option-validator"),a=o.interopDefault(s),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),v=e("./template"),y=o.interopDefault(v),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),I=e("./contextmenu"),$=o.interopDefault(I),R=e("./info"),O=o.interopDefault(R),T=e("./subtitle"),M=o.interopDefault(T),E=e("./events"),C=o.interopDefault(E),F=e("./hotkey"),D=o.interopDefault(F),z=e("./layer"),P=o.interopDefault(z),A=e("./loading"),H=o.interopDefault(A),_=e("./notice"),U=o.interopDefault(_),Z=e("./mask"),L=o.interopDefault(Z),q=e("./icons"),N=o.interopDefault(q),V=e("./setting"),W=o.interopDefault(V),B=e("./storage"),Y=o.interopDefault(B),X=e("./plugins"),G=o.interopDefault(X),J=e("./ads"),Q=o.interopDefault(J),K=e("./mobile"),ee=o.interopDefault(K);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=a.default(r,d.default),this.isReady=!1,this.isFocus=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new y.default(this),this.events=new C.default(this),this.whitelist.state?(this.storage=new Y.default(this),this.icons=new N.default(this),this.i18n=new x.default(this),this.notice=new U.default(this),this.player=new j.default(this),this.layers=new P.default(this),this.controls=new S.default(this),this.contextmenu=new $.default(this),this.subtitle=new M.default(this),this.ads=new Q.default(this),this.info=new O.default(this),this.loading=new H.default(this),this.hotkey=new D.default(this),this.mask=new L.default(this),this.setting=new W.default(this),this.plugins=new G.default(this)):this.mobile=new ee.default(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.12"}static get env(){return"production"}static get build(){return"1651201281283"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return a.default}static get kindOf(){return a.default.kindOf}static get html(){return y.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oe.Line truncated
|
||||
!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,a=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!a[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=a[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return a[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=a,c.parent=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;p<t.length;p++)c(t[p]);var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({E13ST:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),n=o.interopDefault(i),s=e("option-validator"),a=o.interopDefault(s),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),M=o.interopDefault(k),S=e("./contextmenu"),I=o.interopDefault(S),F=e("./info"),$=o.interopDefault(F),T=e("./subtitle"),E=o.interopDefault(T),C=e("./events"),Y=o.interopDefault(C),D=e("./hotkey"),z=o.interopDefault(D),R=e("./layer"),A=o.interopDefault(R),O=e("./loading"),L=o.interopDefault(O),P=e("./notice"),H=o.interopDefault(P),_=e("./mask"),N=o.interopDefault(_),J=e("./icons"),q=o.interopDefault(J),V=e("./setting"),W=o.interopDefault(V),B=e("./storage"),U=o.interopDefault(B),Z=e("./plugins"),X=o.interopDefault(Z),G=e("./ads"),Q=o.interopDefault(G),K=e("./mobile"),ee=o.interopDefault(K);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=a.default(r,d.default),this.isReady=!1,this.isFocus=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new v.default(this),this.events=new Y.default(this),this.whitelist.state?(this.storage=new U.default(this),this.icons=new q.default(this),this.i18n=new x.default(this),this.notice=new H.default(this),this.player=new j.default(this),this.layers=new A.default(this),this.controls=new M.default(this),this.contextmenu=new I.default(this),this.subtitle=new E.default(this),this.ads=new Q.default(this),this.info=new $.default(this),this.loading=new L.default(this),this.hotkey=new z.default(this),this.mask=new N.default(this),this.setting=new W.default(this),this.plugins=new X.default(this)):this.mobile=new ee.default(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.12"}static get env(){return"production"}static get build(){return"1651278049388"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return a.default}static get kindOf(){return a.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oe.SCLine truncated
|
||||
+19
-12
@@ -1,5 +1,5 @@
|
||||
import fs from 'fs';
|
||||
import inquirer from 'inquirer';
|
||||
import prompts from 'prompts';
|
||||
import projects from './projects.js';
|
||||
import { Parcel } from '@parcel/core';
|
||||
|
||||
@@ -56,16 +56,23 @@ if (process.argv.pop() === 'all') {
|
||||
console.log(`✨ Finished building all packages!`);
|
||||
});
|
||||
} else {
|
||||
inquirer
|
||||
.prompt([
|
||||
{
|
||||
type: 'list',
|
||||
message: 'Which project do you want to build?',
|
||||
name: 'project',
|
||||
choices: Object.keys(projects),
|
||||
},
|
||||
])
|
||||
.then((answers) => {
|
||||
build(answers.project);
|
||||
(async () => {
|
||||
const response = await prompts({
|
||||
type: 'select',
|
||||
name: 'value',
|
||||
message: 'Which project do you want to build?',
|
||||
choices: Object.keys(projects).map((name) => {
|
||||
return {
|
||||
title: name,
|
||||
value: name,
|
||||
description: projects[name],
|
||||
};
|
||||
}),
|
||||
initial: 0,
|
||||
});
|
||||
|
||||
if (response.value) {
|
||||
build(response.value);
|
||||
}
|
||||
})();
|
||||
}
|
||||
+19
-12
@@ -1,7 +1,7 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import servor from 'servor';
|
||||
import inquirer from 'inquirer';
|
||||
import prompts from 'prompts';
|
||||
import { fileURLToPath } from 'url';
|
||||
import projects from './projects.js';
|
||||
import { Parcel } from '@parcel/core';
|
||||
@@ -62,15 +62,22 @@ async function develop(name) {
|
||||
});
|
||||
}
|
||||
|
||||
inquirer
|
||||
.prompt([
|
||||
{
|
||||
type: 'list',
|
||||
message: 'Which project do you want to develop?',
|
||||
name: 'project',
|
||||
choices: Object.keys(projects),
|
||||
},
|
||||
])
|
||||
.then((answers) => {
|
||||
develop(answers.project);
|
||||
(async () => {
|
||||
const response = await prompts({
|
||||
type: 'select',
|
||||
name: 'value',
|
||||
message: 'Which project do you want to develop?',
|
||||
choices: Object.keys(projects).map((name) => {
|
||||
return {
|
||||
title: name,
|
||||
value: name,
|
||||
description: projects[name],
|
||||
};
|
||||
}),
|
||||
initial: 0,
|
||||
});
|
||||
|
||||
if (response.value) {
|
||||
develop(response.value);
|
||||
}
|
||||
})();
|
||||
Reference in new issue
Block a user