bobp 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var X=Object.create;var E=Object.defineProperty,Z=Object.defineProperties,tt=Object.getOwnPropertyDescriptor,et=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,nt=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;var T=(t,e,o)=>e in t?E(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,d=(t,e)=>{for(var o in e||(e={}))C.call(e,o)&&T(t,o,e[o]);if(b)for(var o of b(e))rt.call(e,o)&&T(t,o,e[o]);return t},f=(t,e)=>Z(t,et(e));var it=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ot(e))!C.call(t,r)&&r!==o&&E(t,r,{get:()=>e[r],enumerable:!(n=tt(e,r))||n.enumerable});return t};var S=(t,e,o)=>(o=t!=null?X(nt(t)):{},it(e||!t||!t.__esModule?E(o,"default",{value:t,enumerable:!0}):o,t));var a=(t,e,o)=>new Promise((n,r)=>{var m=i=>{try{s(o.next(i))}catch(l){r(l)}},c=i=>{try{s(o.throw(i))}catch(l){r(l)}},s=i=>i.done?n(i.value):Promise.resolve(i.value).then(m,c);s((o=o.apply(t,e)).next())});var W=S(require("yargs")),q=require("yargs/helpers");var j=require("path"),I=require("fs"),L=require("canvas");var D=1280,P=640,F='"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',st=`700 80px ${F}`,ct=`300 48px ${F}`,k=1.2;function R({title:t,description:e,path:o}){let n=(0,L.createCanvas)(D,P),{width:r,height:m}=n,c=n.getContext("2d");c.fillStyle="#001220",c.fillRect(0,0,r,m),c.textAlign="center",c.textBaseline="top";let s=[{str:t,font:st,y:0,h:0,g:1.3},...e.split(`
3
- `).map(p=>({str:p,font:ct,y:0,h:0,g:k}))].map(p=>pt(c,p)),i=s[s.length-1].h;i-=i/k,i=s.reduce((p,V)=>p+V.h,-i),i=Math.ceil(i);let l=Math.floor((P-i)*.5);for(let p of s)at(c,p,l),l+=p.h;let K=(0,j.join)(o,"cover.png"),Q=n.toBuffer("image/png");(0,I.writeFileSync)(K,Q)}function at(t,e,o){t.fillStyle="white",t.font=e.font,t.fillText(e.str,D*.5,o+e.y)}function pt(t,e){t.font=e.font;let o=t.measureText(e.str),{actualBoundingBoxAscent:n,actualBoundingBoxDescent:r}=o,m=n+r;return f(d({},e),{y:n,h:m*e.g})}var g=require("fs"),u=require("path"),_=S(require("degit")),B=require("rimraf");function J(t){return a(this,null,function*(){yield mt(t),lt(t),dt(t)})}function mt(e){return a(this,arguments,function*({name:t}){return yield(0,_.default)("rdarida/template-electron#main").clone((0,u.resolve)(process.cwd(),t))})}function lt({name:t,productName:e}){let o=(0,u.resolve)(process.cwd(),t,"package.json"),n=(0,g.readFileSync)(o,{encoding:"utf-8"}),r=f(d({},JSON.parse(n)),{name:t,productName:e,version:"0.0.0"});(0,g.writeFileSync)(o,JSON.stringify(r,null,2))}function dt({name:t}){["package-lock.json"].forEach(e=>{let o=(0,u.resolve)(process.cwd(),t,e);(0,B.rimrafSync)(o)})}var h=require("path"),x=require("fs");var M=require("path"),y=(0,M.join)(__dirname,"..","templates");var ft=(0,h.join)(y,"license");function A({type:t,year:e,author:o,path:n}){let r=`${t}.txt`,m=(0,h.join)(ft,r),s=(0,x.readFileSync)(m,{encoding:"utf-8"}).replace("[year]",e).replace("[author]",o),i=(0,h.join)(n,"LICENSE");(0,x.writeFileSync)(i,s)}var v=require("path"),O=require("fs"),G=S(require("degit")),H=require("rimraf");function Y(t){return a(this,null,function*(){yield gt(t),ut(t),yt(t)})}function gt(e){return a(this,arguments,function*({name:t}){return yield(0,G.default)("rdarida/template-next#main").clone((0,v.resolve)(process.cwd(),t))})}function ut({name:t}){let e=(0,v.resolve)(process.cwd(),t,"package.json"),o=(0,O.readFileSync)(e,{encoding:"utf-8"}),n=f(d({},JSON.parse(o)),{name:t,version:"0.0.0"});(0,O.writeFileSync)(e,JSON.stringify(n,null,2))}function yt({name:t}){["package-lock.json"].forEach(e=>{let o=(0,v.resolve)(process.cwd(),t,e);(0,H.rimrafSync)(o)})}var w=require("path"),N=require("fs");var $=(0,w.join)(y,"prettier");function z({path:t}){let e=(0,N.readdirSync)($);for(let o of e){let n=(0,w.join)($,o),r=(0,w.join)(t,`.${o}`);(0,N.copyFileSync)(n,r)}}function U(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9\-]/g,"")}(0,W.default)((0,q.hideBin)(process.argv)).scriptName("bobp").usage("$0 <cmd> [args]","Usage").demandCommand(1,"Need 1").command("cover <title> <description> [path]","Generates a PNG cover image (cover.png) in the current working directory",t=>t.positional("title",{demandOption:!0,describe:"Main title text displayed on the cover",type:"string"}).positional("description",{demandOption:!0,describe:"Description text displayed below the title",type:"string"}).positional("path",{default:process.cwd(),describe:"Output path for the generated cover image",type:"string"}),t=>R(t)).command("license <author> [year] [type] [path]","Generates a LICENSE file in the current working directory",t=>t.positional("author",{demandOption:!0,describe:"Author or copyright holder name",type:"string"}).positional("year",{default:new Date().getFullYear().toString(),describe:"Year to be inserted into the license text",type:"string"}).positional("type",{default:"mit",describe:'License type (e.g. "mit")',type:"string"}).positional("path",{default:process.cwd(),describe:"Output path for the generated LICENSE file",type:"string"}),t=>A(t)).command("electron <productName> [name]","Creates a new Electron project in the current working directory",t=>t.positional("productName",{demandOption:!0,describe:"Name of the application",type:"string"}).positional("name",{describe:"Name of the project directory and npm package",type:"string"}),o=>a(null,[o],function*({productName:t,name:e}){e=e||U(t),yield J({name:e,productName:t})})).command("next <name>","Creates a new Next.js project in the current working directory",t=>t.positional("name",{demandOption:!0,describe:"Name of the project directory and npm package",type:"string"}),t=>a(null,null,function*(){return yield Y(t)})).command("prettier [path]","Copies Prettier configuration files into the current working directory",t=>t.positional("path",{default:process.cwd(),describe:"Output path for the generated Prettier configuration files",type:"string"}),t=>z(t)).help().strict().parse();
2
+ "use strict";var X=Object.create;var w=Object.defineProperty,Z=Object.defineProperties,tt=Object.getOwnPropertyDescriptor,et=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols,nt=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;var T=(t,e,o)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,d=(t,e)=>{for(var o in e||(e={}))C.call(e,o)&&T(t,o,e[o]);if(S)for(var o of S(e))rt.call(e,o)&&T(t,o,e[o]);return t},f=(t,e)=>Z(t,et(e));var it=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ot(e))!C.call(t,r)&&r!==o&&w(t,r,{get:()=>e[r],enumerable:!(n=tt(e,r))||n.enumerable});return t};var b=(t,e,o)=>(o=t!=null?X(nt(t)):{},it(e||!t||!t.__esModule?w(o,"default",{value:t,enumerable:!0}):o,t));var p=(t,e,o)=>new Promise((n,r)=>{var a=i=>{try{s(o.next(i))}catch(m){r(m)}},c=i=>{try{s(o.throw(i))}catch(m){r(m)}},s=i=>i.done?n(i.value):Promise.resolve(i.value).then(a,c);s((o=o.apply(t,e)).next())});var W=b(require("yargs")),q=require("yargs/helpers");var k=require("path"),I=require("fs"),L=require("canvas");var D=1280,P=640,F='"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',st=`700 80px ${F}`,at=`300 48px ${F}`,j=1.2;function R({title:t,description:e,path:o}){let n=(0,L.createCanvas)(D,P),{width:r,height:a}=n,c=n.getContext("2d");c.fillStyle="#001220",c.fillRect(0,0,r,a),c.textAlign="center",c.textBaseline="top";let s=[{str:t,font:st,y:0,h:0,g:1.3},...e.split(`
3
+ `).map(l=>({str:l,font:at,y:0,h:0,g:j}))].map(l=>pt(c,l)),i=s[s.length-1].h;i-=i/j,i=s.reduce((l,V)=>l+V.h,-i),i=Math.ceil(i);let m=Math.floor((P-i)*.5);for(let l of s)ct(c,l,m),m+=l.h;let K=(0,k.join)(o,"cover.png"),Q=n.toBuffer("image/png");(0,I.writeFileSync)(K,Q)}function ct(t,e,o){t.fillStyle="white",t.font=e.font,t.fillText(e.str,D*.5,o+e.y)}function pt(t,e){t.font=e.font;let o=t.measureText(e.str),{actualBoundingBoxAscent:n,actualBoundingBoxDescent:r}=o,a=n+r;return f(d({},e),{y:n,h:a*e.g})}var g=require("fs"),u=require("path"),_=b(require("degit")),B=require("rimraf");function J(t){return p(this,null,function*(){yield lt(t),mt(t),dt(t)})}function lt(o){return p(this,arguments,function*({name:t,path:e}){return yield(0,_.default)("rdarida/template-electron#main").clone((0,u.join)(e,t))})}function mt({name:t,productName:e,path:o}){let n=(0,u.join)(o,t,"package.json"),r=(0,g.readFileSync)(n,{encoding:"utf-8"}),a=f(d({},JSON.parse(r)),{name:t,productName:e,version:"0.0.0"});(0,g.writeFileSync)(n,JSON.stringify(a,null,2))}function dt({name:t,path:e}){["package-lock.json"].forEach(o=>{let n=(0,u.join)(e,t,o);(0,B.rimrafSync)(n)})}var y=require("path"),x=require("fs");var M=require("path"),h=(0,M.join)(__dirname,"..","templates");var ft=(0,y.join)(h,"license");function A({type:t,year:e,author:o,path:n}){let r=`${t}.txt`,a=(0,y.join)(ft,r),s=(0,x.readFileSync)(a,{encoding:"utf-8"}).replace("[year]",e).replace("[author]",o),i=(0,y.join)(n,"LICENSE");(0,x.writeFileSync)(i,s)}var O=require("fs"),v=require("path"),G=b(require("degit")),H=require("rimraf");function Y(t){return p(this,null,function*(){yield gt(t),ut(t),ht(t)})}function gt(o){return p(this,arguments,function*({name:t,path:e}){return yield(0,G.default)("rdarida/template-next#main").clone((0,v.join)(e,t))})}function ut({name:t,path:e}){let o=(0,v.join)(e,t,"package.json"),n=(0,O.readFileSync)(o,{encoding:"utf-8"}),r=f(d({},JSON.parse(n)),{name:t,version:"0.0.0"});(0,O.writeFileSync)(o,JSON.stringify(r,null,2))}function ht({name:t,path:e}){["package-lock.json"].forEach(o=>{let n=(0,v.join)(e,t,o);(0,H.rimrafSync)(n)})}var N=require("path"),E=require("fs");var $=(0,N.join)(h,"prettier");function z({path:t}){let e=(0,E.readdirSync)($);for(let o of e){let n=(0,N.join)($,o),r=(0,N.join)(t,`.${o}`);(0,E.copyFileSync)(n,r)}}function U(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9\-]/g,"")}(0,W.default)((0,q.hideBin)(process.argv)).scriptName("bobp").usage("$0 <cmd> [args]","Usage").demandCommand(1,"Need 1").command("cover <title> <description> [path]","Generates a PNG cover image (cover.png) in the current working directory",t=>t.positional("title",{demandOption:!0,describe:"Main title text displayed on the cover",type:"string"}).positional("description",{demandOption:!0,describe:"Description text displayed below the title",type:"string"}).positional("path",{default:process.cwd(),describe:"Output path for the generated cover image",type:"string"}),t=>R(t)).command("license <author> [year] [type] [path]","Generates a LICENSE file in the current working directory",t=>t.positional("author",{demandOption:!0,describe:"Author or copyright holder name",type:"string"}).positional("year",{default:new Date().getFullYear().toString(),describe:"Year to be inserted into the license text",type:"string"}).positional("type",{default:"mit",describe:'License type (e.g. "mit")',type:"string"}).positional("path",{default:process.cwd(),describe:"Output path for the generated LICENSE file",type:"string"}),t=>A(t)).command("electron <productName> [name] [path]","Creates a new Electron project in the current working directory",t=>t.positional("productName",{demandOption:!0,describe:"Name of the application",type:"string"}).positional("name",{describe:"Name of the project directory and npm package",type:"string"}).positional("path",{default:process.cwd(),describe:"Output path for the generated Electron project",type:"string"}),n=>p(null,[n],function*({productName:t,name:e,path:o}){e=e||U(t),yield J({name:e,productName:t,path:o})})).command("next <name> [path]","Creates a new Next.js project in the current working directory",t=>t.positional("name",{demandOption:!0,describe:"Name of the project directory and npm package",type:"string"}).positional("path",{default:process.cwd(),describe:"Output path for the generated Next.js project",type:"string"}),t=>p(null,null,function*(){return yield Y(t)})).command("prettier [path]","Copies Prettier configuration files into the current working directory",t=>t.positional("path",{default:process.cwd(),describe:"Output path for the generated Prettier configuration files",type:"string"}),t=>z(t)).help().strict().parse();
package/dist/index.d.ts CHANGED
@@ -30,6 +30,11 @@ type ElectronOptions = {
30
30
  name: string;
31
31
  /** Name of the application */
32
32
  productName: string;
33
+ /**
34
+ * Output path for the generated Electron project
35
+ * (default: the current working directory)
36
+ */
37
+ path: string;
33
38
  };
34
39
  /**
35
40
  * Creates a new Electron project from a
@@ -69,6 +74,11 @@ declare function license({ type, year, author, path }: LicenseOptions): void;
69
74
  type NextOptions = {
70
75
  /** Name of the project directory and npm package */
71
76
  name: string;
77
+ /**
78
+ * Output path for the generated Next.js project
79
+ * (default: the current working directory)
80
+ */
81
+ path: string;
72
82
  };
73
83
  /**
74
84
  * Creates a new Next.js project from a
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var G=Object.create;var d=Object.defineProperty,U=Object.defineProperties,W=Object.getOwnPropertyDescriptor,q=Object.getOwnPropertyDescriptors,K=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,Q=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var P=(t,e,o)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,m=(t,e)=>{for(var o in e||(e={}))O.call(e,o)&&P(t,o,e[o]);if(w)for(var o of w(e))V.call(e,o)&&P(t,o,e[o]);return t},l=(t,e)=>U(t,q(e));var X=(t,e)=>{for(var o in e)d(t,o,{get:e[o],enumerable:!0})},C=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of K(e))!O.call(t,r)&&r!==o&&d(t,r,{get:()=>e[r],enumerable:!(n=W(e,r))||n.enumerable});return t};var I=(t,e,o)=>(o=t!=null?G(Q(t)):{},C(e||!t||!t.__esModule?d(o,"default",{value:t,enumerable:!0}):o,t)),Z=t=>C(d({},"__esModule",{value:!0}),t);var g=(t,e,o)=>new Promise((n,r)=>{var p=i=>{try{s(o.next(i))}catch(f){r(f)}},c=i=>{try{s(o.throw(i))}catch(f){r(f)}},s=i=>i.done?n(i.value):Promise.resolve(i.value).then(p,c);s((o=o.apply(t,e)).next())});var yt={};X(yt,{cover:()=>ot,electron:()=>it,license:()=>ft,next:()=>mt,normalize:()=>xt,prettier:()=>ut});module.exports=Z(yt);var F=require("path"),j=require("fs"),k=require("canvas");var _=1280,R=640,L='"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',tt=`700 80px ${L}`,et=`300 48px ${L}`,D=1.2;function ot({title:t,description:e,path:o}){let n=(0,k.createCanvas)(_,R),{width:r,height:p}=n,c=n.getContext("2d");c.fillStyle="#001220",c.fillRect(0,0,r,p),c.textAlign="center",c.textBaseline="top";let s=[{str:t,font:tt,y:0,h:0,g:1.3},...e.split(`
2
- `).map(a=>({str:a,font:et,y:0,h:0,g:D}))].map(a=>rt(c,a)),i=s[s.length-1].h;i-=i/D,i=s.reduce((a,z)=>a+z.h,-i),i=Math.ceil(i);let f=Math.floor((R-i)*.5);for(let a of s)nt(c,a,f),f+=a.h;let $=(0,F.join)(o,"cover.png"),Y=n.toBuffer("image/png");(0,j.writeFileSync)($,Y)}function nt(t,e,o){t.fillStyle="white",t.font=e.font,t.fillText(e.str,_*.5,o+e.y)}function rt(t,e){t.font=e.font;let o=t.measureText(e.str),{actualBoundingBoxAscent:n,actualBoundingBoxDescent:r}=o,p=n+r;return l(m({},e),{y:n,h:p*e.g})}var u=require("fs"),x=require("path"),b=I(require("degit")),J=require("rimraf");function it(t){return g(this,null,function*(){yield st(t),ct(t),at(t)})}function st(e){return g(this,arguments,function*({name:t}){return yield(0,b.default)("rdarida/template-electron#main").clone((0,x.resolve)(process.cwd(),t))})}function ct({name:t,productName:e}){let o=(0,x.resolve)(process.cwd(),t,"package.json"),n=(0,u.readFileSync)(o,{encoding:"utf-8"}),r=l(m({},JSON.parse(n)),{name:t,productName:e,version:"0.0.0"});(0,u.writeFileSync)(o,JSON.stringify(r,null,2))}function at({name:t}){["package-lock.json"].forEach(e=>{let o=(0,x.resolve)(process.cwd(),t,e);(0,J.rimrafSync)(o)})}var h=require("path"),v=require("fs");var B=require("path"),y=(0,B.join)(__dirname,"..","templates");var pt=(0,h.join)(y,"license");function ft({type:t,year:e,author:o,path:n}){let r=`${t}.txt`,p=(0,h.join)(pt,r),s=(0,v.readFileSync)(p,{encoding:"utf-8"}).replace("[year]",e).replace("[author]",o),i=(0,h.join)(n,"LICENSE");(0,v.writeFileSync)(i,s)}var S=require("path"),T=require("fs"),H=I(require("degit")),M=require("rimraf");function mt(t){return g(this,null,function*(){yield lt(t),gt(t),dt(t)})}function lt(e){return g(this,arguments,function*({name:t}){return yield(0,H.default)("rdarida/template-next#main").clone((0,S.resolve)(process.cwd(),t))})}function gt({name:t}){let e=(0,S.resolve)(process.cwd(),t,"package.json"),o=(0,T.readFileSync)(e,{encoding:"utf-8"}),n=l(m({},JSON.parse(o)),{name:t,version:"0.0.0"});(0,T.writeFileSync)(e,JSON.stringify(n,null,2))}function dt({name:t}){["package-lock.json"].forEach(e=>{let o=(0,S.resolve)(process.cwd(),t,e);(0,M.rimrafSync)(o)})}var E=require("path"),N=require("fs");var A=(0,E.join)(y,"prettier");function ut({path:t}){let e=(0,N.readdirSync)(A);for(let o of e){let n=(0,E.join)(A,o),r=(0,E.join)(t,`.${o}`);(0,N.copyFileSync)(n,r)}}function xt(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9\-]/g,"")}0&&(module.exports={cover,electron,license,next,normalize,prettier});
1
+ "use strict";var G=Object.create;var d=Object.defineProperty,U=Object.defineProperties,W=Object.getOwnPropertyDescriptor,q=Object.getOwnPropertyDescriptors,K=Object.getOwnPropertyNames,P=Object.getOwnPropertySymbols,Q=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var O=(t,e,o)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,m=(t,e)=>{for(var o in e||(e={}))C.call(e,o)&&O(t,o,e[o]);if(P)for(var o of P(e))V.call(e,o)&&O(t,o,e[o]);return t},l=(t,e)=>U(t,q(e));var X=(t,e)=>{for(var o in e)d(t,o,{get:e[o],enumerable:!0})},I=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of K(e))!C.call(t,r)&&r!==o&&d(t,r,{get:()=>e[r],enumerable:!(n=W(e,r))||n.enumerable});return t};var j=(t,e,o)=>(o=t!=null?G(Q(t)):{},I(e||!t||!t.__esModule?d(o,"default",{value:t,enumerable:!0}):o,t)),Z=t=>I(d({},"__esModule",{value:!0}),t);var g=(t,e,o)=>new Promise((n,r)=>{var c=i=>{try{s(o.next(i))}catch(f){r(f)}},a=i=>{try{s(o.throw(i))}catch(f){r(f)}},s=i=>i.done?n(i.value):Promise.resolve(i.value).then(c,a);s((o=o.apply(t,e)).next())});var yt={};X(yt,{cover:()=>ot,electron:()=>it,license:()=>ft,next:()=>mt,normalize:()=>xt,prettier:()=>ut});module.exports=Z(yt);var D=require("path"),F=require("fs"),k=require("canvas");var _=1280,w=640,L='"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',tt=`700 80px ${L}`,et=`300 48px ${L}`,R=1.2;function ot({title:t,description:e,path:o}){let n=(0,k.createCanvas)(_,w),{width:r,height:c}=n,a=n.getContext("2d");a.fillStyle="#001220",a.fillRect(0,0,r,c),a.textAlign="center",a.textBaseline="top";let s=[{str:t,font:tt,y:0,h:0,g:1.3},...e.split(`
2
+ `).map(p=>({str:p,font:et,y:0,h:0,g:R}))].map(p=>rt(a,p)),i=s[s.length-1].h;i-=i/R,i=s.reduce((p,z)=>p+z.h,-i),i=Math.ceil(i);let f=Math.floor((w-i)*.5);for(let p of s)nt(a,p,f),f+=p.h;let $=(0,D.join)(o,"cover.png"),Y=n.toBuffer("image/png");(0,F.writeFileSync)($,Y)}function nt(t,e,o){t.fillStyle="white",t.font=e.font,t.fillText(e.str,_*.5,o+e.y)}function rt(t,e){t.font=e.font;let o=t.measureText(e.str),{actualBoundingBoxAscent:n,actualBoundingBoxDescent:r}=o,c=n+r;return l(m({},e),{y:n,h:c*e.g})}var u=require("fs"),x=require("path"),b=j(require("degit")),J=require("rimraf");function it(t){return g(this,null,function*(){yield st(t),ct(t),at(t)})}function st(o){return g(this,arguments,function*({name:t,path:e}){return yield(0,b.default)("rdarida/template-electron#main").clone((0,x.join)(e,t))})}function ct({name:t,productName:e,path:o}){let n=(0,x.join)(o,t,"package.json"),r=(0,u.readFileSync)(n,{encoding:"utf-8"}),c=l(m({},JSON.parse(r)),{name:t,productName:e,version:"0.0.0"});(0,u.writeFileSync)(n,JSON.stringify(c,null,2))}function at({name:t,path:e}){["package-lock.json"].forEach(o=>{let n=(0,x.join)(e,t,o);(0,J.rimrafSync)(n)})}var h=require("path"),v=require("fs");var B=require("path"),y=(0,B.join)(__dirname,"..","templates");var pt=(0,h.join)(y,"license");function ft({type:t,year:e,author:o,path:n}){let r=`${t}.txt`,c=(0,h.join)(pt,r),s=(0,v.readFileSync)(c,{encoding:"utf-8"}).replace("[year]",e).replace("[author]",o),i=(0,h.join)(n,"LICENSE");(0,v.writeFileSync)(i,s)}var S=require("fs"),T=require("path"),H=j(require("degit")),M=require("rimraf");function mt(t){return g(this,null,function*(){yield lt(t),gt(t),dt(t)})}function lt(o){return g(this,arguments,function*({name:t,path:e}){return yield(0,H.default)("rdarida/template-next#main").clone((0,T.join)(e,t))})}function gt({name:t,path:e}){let o=(0,T.join)(e,t,"package.json"),n=(0,S.readFileSync)(o,{encoding:"utf-8"}),r=l(m({},JSON.parse(n)),{name:t,version:"0.0.0"});(0,S.writeFileSync)(o,JSON.stringify(r,null,2))}function dt({name:t,path:e}){["package-lock.json"].forEach(o=>{let n=(0,T.join)(e,t,o);(0,M.rimrafSync)(n)})}var E=require("path"),N=require("fs");var A=(0,E.join)(y,"prettier");function ut({path:t}){let e=(0,N.readdirSync)(A);for(let o of e){let n=(0,E.join)(A,o),r=(0,E.join)(t,`.${o}`);(0,N.copyFileSync)(n,r)}}function xt(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9\-]/g,"")}0&&(module.exports={cover,electron,license,next,normalize,prettier});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bobp",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "How can I help you, Bobp?",
5
5
  "keywords": [],
6
6
  "license": "MIT",