diff --git a/404.html b/404.html index 6780815..1765e5a 100644 --- a/404.html +++ b/404.html @@ -6,7 +6,7 @@ Page Not Found | Simple Scaffold - + diff --git a/assets/js/3bd150b0.1af6634b.js b/assets/js/3bd150b0.92cbd916.js similarity index 94% rename from assets/js/3bd150b0.1af6634b.js rename to assets/js/3bd150b0.92cbd916.js index dc3a0c6..71c73d0 100644 --- a/assets/js/3bd150b0.1af6634b.js +++ b/assets/js/3bd150b0.92cbd916.js @@ -1 +1 @@ -"use strict";(self.webpackChunksimple_scaffold_docs=self.webpackChunksimple_scaffold_docs||[]).push([[189],{2248:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>t,contentTitle:()=>r,default:()=>a,frontMatter:()=>d,metadata:()=>c,toc:()=>o});var i=s(1527),l=s(3108);const d={id:"ScaffoldConfig",title:"Interface: ScaffoldConfig",sidebar_label:"ScaffoldConfig",sidebar_position:0,custom_edit_url:null},r=void 0,c={id:"api/interfaces/ScaffoldConfig",title:"Interface: ScaffoldConfig",description:"The config object for defining a scaffolding group.",source:"@site/docs/api/interfaces/ScaffoldConfig.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ScaffoldConfig",permalink:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",draft:!1,unlisted:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"ScaffoldConfig",title:"Interface: ScaffoldConfig",sidebar_label:"ScaffoldConfig",sidebar_position:0,custom_edit_url:null},sidebar:"docs",previous:{title:"Exports",permalink:"/simple-scaffold/docs/api/modules"},next:{title:"Usage",permalink:"/simple-scaffold/docs/usage/"}},t={},o=[{value:"Properties",id:"properties",level:2},{value:"name",id:"name",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"templates",id:"templates",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"output",id:"output",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"subdir",id:"subdir",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"data",id:"data",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"overwrite",id:"overwrite",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"logLevel",id:"loglevel",level:3},{value:"Defined in",id:"defined-in-6",level:4},{value:"dryRun",id:"dryrun",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"helpers",id:"helpers",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"subdirHelper",id:"subdirhelper",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"Methods",id:"methods",level:2},{value:"beforeWrite",id:"beforewrite",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-10",level:4}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"The config object for defining a scaffolding group."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://chenasraf.github.io/simple-scaffold/docs/usage/node%7C",children:"Node.js usage"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://chenasraf.github.io/simple-scaffold/docs/usage/cli%7C",children:"CLI usage"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"properties",children:"Properties"}),"\n",(0,i.jsx)(n.h3,{id:"name",children:"name"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.strong,{children:"name"}),": ",(0,i.jsx)(n.code,{children:"string"})]}),"\n",(0,i.jsxs)(n.p,{children:["Name to be passed to the generated files. ",(0,i.jsx)(n.code,{children:"{{name}}"})," and ",(0,i.jsx)(n.code,{children:"{{Name}}"})," inside contents and file names will be replaced\naccordingly."]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L19",children:"types.ts:19"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"templates",children:"templates"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.strong,{children:"templates"}),": ",(0,i.jsx)(n.code,{children:"string"}),"[]"]}),"\n",(0,i.jsx)(n.p,{children:"Template files to use as input. You may provide multiple files, each of which can be a relative or absolute path,\nor a glob pattern for multiple file matching easily."}),"\n",(0,i.jsxs)(n.p,{children:["You may omit files from output by prepending a ",(0,i.jsx)(n.code,{children:"!"})," to their glob pattern."]}),"\n",(0,i.jsxs)(n.p,{children:["For example, ",(0,i.jsx)(n.code,{children:'["components/**", "!components/README.md"]'})," will include everything in the directory ",(0,i.jsx)(n.code,{children:"components"}),"\nexcept the ",(0,i.jsx)(n.code,{children:"README.md"})," file inside."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"Current working directory\n"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-1",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L32",children:"types.ts:32"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"output",children:"output"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.strong,{children:"output"}),": ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponse",children:(0,i.jsx)(n.code,{children:"FileResponse"})}),"<",(0,i.jsx)(n.code,{children:"string"}),">"]}),"\n",(0,i.jsxs)(n.p,{children:["Path to output to. If ",(0,i.jsx)(n.code,{children:"subdir"})," is ",(0,i.jsx)(n.code,{children:"true"}),", the subdir will be created inside this path."]}),"\n",(0,i.jsxs)(n.p,{children:["May also be a ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})," which returns a new output path to override the default one."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponse",children:"FileResponse"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-2",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L42",children:"types.ts:42"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"subdir",children:"subdir"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"subdir"}),": ",(0,i.jsx)(n.code,{children:"boolean"})]}),"\n",(0,i.jsx)(n.p,{children:"Whether to create subdir with the input name."}),"\n",(0,i.jsxs)(n.p,{children:["When ",(0,i.jsx)(n.code,{children:"true"}),", you may also use ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig#subdirhelper",children:"subdirHelper"})," to determine a pre-process helper on\nthe directory name."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"false"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-3",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L52",children:"types.ts:52"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"data",children:"data"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"data"}),": ",(0,i.jsx)(n.code,{children:"Record"}),"<",(0,i.jsx)(n.code,{children:"string"}),", ",(0,i.jsx)(n.code,{children:"any"}),">"]}),"\n",(0,i.jsxs)(n.p,{children:["Add custom data to the templates. By default, only your app name is included as ",(0,i.jsx)(n.code,{children:"{{name}}"})," and ",(0,i.jsx)(n.code,{children:"{{Name}}"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"This can be any object that will be usable by Handlebars."}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-4",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L59",children:"types.ts:59"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"overwrite",children:"overwrite"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"overwrite"}),": ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponse",children:(0,i.jsx)(n.code,{children:"FileResponse"})}),"<",(0,i.jsx)(n.code,{children:"boolean"}),">"]}),"\n",(0,i.jsx)(n.p,{children:"Enable to override output files, even if they already exist."}),"\n",(0,i.jsxs)(n.p,{children:["You may supply a function to this option, which can take the arguments ",(0,i.jsx)(n.code,{children:"(fullPath, baseDir, baseName)"})," and returns\na boolean for each file."]}),"\n",(0,i.jsxs)(n.p,{children:["May also be a ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})," which returns a boolean value per file."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponse",children:"FileResponse"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"false"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-5",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L74",children:"types.ts:74"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"loglevel",children:"logLevel"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"logLevel"}),": ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#loglevel-1",children:(0,i.jsx)(n.code,{children:"LogLevel"})})]}),"\n",(0,i.jsx)(n.p,{children:"Determine amount of logs to display."}),"\n",(0,i.jsxs)(n.p,{children:["The values are: ",(0,i.jsx)(n.code,{children:"0 (none) | 1 (debug) | 2 (info) | 3 (warn) | 4 (error)"}),". The provided level will display messages\nof the same level or higher."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#loglevel",children:"LogLevel"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"2 (info)"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-6",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L86",children:"types.ts:86"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dryrun",children:"dryRun"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"dryRun"}),": ",(0,i.jsx)(n.code,{children:"boolean"})]}),"\n",(0,i.jsx)(n.p,{children:"Don't emit files. This is good for testing your scaffolds and making sure they don't fail, without having to write\nactual file contents or create directories."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"false"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-7",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L94",children:"types.ts:94"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"helpers",children:"helpers"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"helpers"}),": ",(0,i.jsx)(n.code,{children:"Record"}),"<",(0,i.jsx)(n.code,{children:"string"}),", ",(0,i.jsx)(n.code,{children:"HelperDelegate"}),">"]}),"\n",(0,i.jsx)(n.p,{children:"Additional helpers to add to the template parser. Provide an object whose keys are the name of the function to add,\nand the value is the helper function itself. The signature of helpers is as follows:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"(text: string, ...args: any[]) => string\n"})}),"\n",(0,i.jsx)(n.p,{children:"A full example might be:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"Scaffold({\n //...\n helpers: {\n upperKebabCase: (text) => kebabCase(text).toUpperCase()\n }\n})\n"})}),"\n",(0,i.jsx)(n.p,{children:"Which will allow:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{{ upperKebabCase "my value" }}\n'})}),"\n",(0,i.jsx)(n.p,{children:"To transform to:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"MY-VALUE\n"})}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})," for a list of all the built-in available helpers."]}),"\n",(0,i.jsxs)(n.p,{children:["Simple Scaffold uses Handlebars.js, so all the syntax from there is supported. See\n",(0,i.jsx)(n.a,{href:"https://handlebarsjs.com/guide/#custom-helpers",children:"their docs"})," for more information."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://chenasraf.github.io/simple-scaffold/docs/usage/templates%7C",children:"Templates"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-8",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L136",children:"types.ts:136"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"subdirhelper",children:"subdirHelper"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"subdirHelper"}),": ",(0,i.jsx)(n.code,{children:"string"})]}),"\n",(0,i.jsxs)(n.p,{children:["Default transformer to apply to subdir name when using ",(0,i.jsx)(n.code,{children:"subdir: true"}),". Can be one of the default\ncapitalization helpers, or a custom one you provide to ",(0,i.jsx)(n.code,{children:"helpers"}),". Defaults to ",(0,i.jsx)(n.code,{children:"undefined"}),", which means no\ntransformation is done."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig#subdir",children:"subdir"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-9",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L147",children:"types.ts:147"})}),"\n",(0,i.jsx)(n.h2,{id:"methods",children:"Methods"}),"\n",(0,i.jsx)(n.h3,{id:"beforewrite",children:"beforeWrite"}),"\n",(0,i.jsxs)(n.p,{children:["\u25b8 ",(0,i.jsx)(n.strong,{children:"beforeWrite"}),"(",(0,i.jsx)(n.code,{children:"content"}),", ",(0,i.jsx)(n.code,{children:"rawContent"}),", ",(0,i.jsx)(n.code,{children:"outputPath"}),"): ",(0,i.jsx)(n.code,{children:"undefined"})," | ",(0,i.jsx)(n.code,{children:"string"})," | ",(0,i.jsx)(n.code,{children:"Buffer"})," | ",(0,i.jsx)(n.code,{children:"Promise"}),"<",(0,i.jsx)(n.code,{children:"undefined"})," | ",(0,i.jsx)(n.code,{children:"string"})," | ",(0,i.jsx)(n.code,{children:"Buffer"}),">"]}),"\n",(0,i.jsx)(n.p,{children:"This callback runs right before content is being written to the disk. If you supply this function, you may return\na string that represents the final content of your file, you may process the content as you see fit. For example,\nyou may run formatters on a file, fix output in edge-cases not supported by helpers or data, etc."}),"\n",(0,i.jsxs)(n.p,{children:["If the return value of this function is ",(0,i.jsx)(n.code,{children:"undefined"}),", the original content will be used."]}),"\n",(0,i.jsx)(n.h4,{id:"parameters",children:"Parameters"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{style:{textAlign:"left"},children:"Name"}),(0,i.jsx)(n.th,{style:{textAlign:"left"},children:"Type"}),(0,i.jsx)(n.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"content"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"Buffer"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"The original template after token replacement"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"rawContent"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"Buffer"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"The original template before token replacement"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"outputPath"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"string"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"The final output path of the processed file"})]})]})]}),"\n",(0,i.jsx)(n.h4,{id:"returns",children:"Returns"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"undefined"})," | ",(0,i.jsx)(n.code,{children:"string"})," | ",(0,i.jsx)(n.code,{children:"Buffer"})," | ",(0,i.jsx)(n.code,{children:"Promise"}),"<",(0,i.jsx)(n.code,{children:"undefined"})," | ",(0,i.jsx)(n.code,{children:"string"})," | ",(0,i.jsx)(n.code,{children:"Buffer"}),">"]}),"\n",(0,i.jsxs)(n.p,{children:["The final output of the file\ncontents-only, after further modifications - or ",(0,i.jsx)(n.code,{children:"undefined"})," to use the original content (i.e. ",(0,i.jsx)(n.code,{children:"content.toString()"}),")"]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-10",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L163",children:"types.ts:163"})})]})}function a(e={}){const{wrapper:n}={...(0,l.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},3108:(e,n,s)=>{s.d(n,{Z:()=>c,a:()=>r});var i=s(959);const l={},d=i.createContext(l);function r(e){const n=i.useContext(d);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:r(e.components),i.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunksimple_scaffold_docs=self.webpackChunksimple_scaffold_docs||[]).push([[189],{2248:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>a,frontMatter:()=>d,metadata:()=>t,toc:()=>o});var i=s(1527),l=s(3108);const d={id:"ScaffoldConfig",title:"Interface: ScaffoldConfig",sidebar_label:"ScaffoldConfig",sidebar_position:0,custom_edit_url:null},r=void 0,t={id:"api/interfaces/ScaffoldConfig",title:"Interface: ScaffoldConfig",description:"The config object for defining a scaffolding group.",source:"@site/docs/api/interfaces/ScaffoldConfig.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/ScaffoldConfig",permalink:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",draft:!1,unlisted:!1,editUrl:null,tags:[],version:"current",sidebarPosition:0,frontMatter:{id:"ScaffoldConfig",title:"Interface: ScaffoldConfig",sidebar_label:"ScaffoldConfig",sidebar_position:0,custom_edit_url:null},sidebar:"docs",previous:{title:"Exports",permalink:"/simple-scaffold/docs/api/modules"},next:{title:"Usage",permalink:"/simple-scaffold/docs/usage/"}},c={},o=[{value:"Properties",id:"properties",level:2},{value:"name",id:"name",level:3},{value:"Defined in",id:"defined-in",level:4},{value:"templates",id:"templates",level:3},{value:"Defined in",id:"defined-in-1",level:4},{value:"output",id:"output",level:3},{value:"Defined in",id:"defined-in-2",level:4},{value:"subdir",id:"subdir",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"data",id:"data",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"overwrite",id:"overwrite",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"logLevel",id:"loglevel",level:3},{value:"Defined in",id:"defined-in-6",level:4},{value:"dryRun",id:"dryrun",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"helpers",id:"helpers",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"subdirHelper",id:"subdirhelper",level:3},{value:"Defined in",id:"defined-in-9",level:4},{value:"Methods",id:"methods",level:2},{value:"beforeWrite",id:"beforewrite",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in-10",level:4}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"The config object for defining a scaffolding group."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://chenasraf.github.io/simple-scaffold/docs/usage/node%7C",children:"Node.js usage"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://chenasraf.github.io/simple-scaffold/docs/usage/cli%7C",children:"CLI usage"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"properties",children:"Properties"}),"\n",(0,i.jsx)(n.h3,{id:"name",children:"name"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.strong,{children:"name"}),": ",(0,i.jsx)(n.code,{children:"string"})]}),"\n",(0,i.jsxs)(n.p,{children:["Name to be passed to the generated files. ",(0,i.jsx)(n.code,{children:"{{name}}"})," and ",(0,i.jsx)(n.code,{children:"{{Name}}"})," inside contents and file names will be replaced\naccordingly."]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L19",children:"types.ts:19"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"templates",children:"templates"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.strong,{children:"templates"}),": ",(0,i.jsx)(n.code,{children:"string"}),"[]"]}),"\n",(0,i.jsx)(n.p,{children:"Template files to use as input. You may provide multiple files, each of which can be a relative or absolute path,\nor a glob pattern for multiple file matching easily."}),"\n",(0,i.jsxs)(n.p,{children:["You may omit files from output by prepending a ",(0,i.jsx)(n.code,{children:"!"})," to their glob pattern."]}),"\n",(0,i.jsxs)(n.p,{children:["For example, ",(0,i.jsx)(n.code,{children:'["components/**", "!components/README.md"]'})," will include everything in the directory ",(0,i.jsx)(n.code,{children:"components"}),"\nexcept the ",(0,i.jsx)(n.code,{children:"README.md"})," file inside."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"Current working directory\n"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-1",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L32",children:"types.ts:32"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"output",children:"output"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.strong,{children:"output"}),": ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponse",children:(0,i.jsx)(n.code,{children:"FileResponse"})}),"<",(0,i.jsx)(n.code,{children:"string"}),">"]}),"\n",(0,i.jsxs)(n.p,{children:["Path to output to. If ",(0,i.jsx)(n.code,{children:"subdir"})," is ",(0,i.jsx)(n.code,{children:"true"}),", the subdir will be created inside this path."]}),"\n",(0,i.jsxs)(n.p,{children:["May also be a ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})," which returns a new output path to override the default one."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponse",children:"FileResponse"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-2",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L42",children:"types.ts:42"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"subdir",children:"subdir"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"subdir"}),": ",(0,i.jsx)(n.code,{children:"boolean"})]}),"\n",(0,i.jsx)(n.p,{children:"Whether to create subdir with the input name."}),"\n",(0,i.jsxs)(n.p,{children:["When ",(0,i.jsx)(n.code,{children:"true"}),", you may also use ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig#subdirhelper",children:"subdirHelper"})," to determine a pre-process helper on\nthe directory name."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"false"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-3",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L52",children:"types.ts:52"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"data",children:"data"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"data"}),": ",(0,i.jsx)(n.code,{children:"Record"}),"<",(0,i.jsx)(n.code,{children:"string"}),", ",(0,i.jsx)(n.code,{children:"any"}),">"]}),"\n",(0,i.jsxs)(n.p,{children:["Add custom data to the templates. By default, only your app name is included as ",(0,i.jsx)(n.code,{children:"{{name}}"})," and ",(0,i.jsx)(n.code,{children:"{{Name}}"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"This can be any object that will be usable by Handlebars."}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-4",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L59",children:"types.ts:59"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"overwrite",children:"overwrite"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"overwrite"}),": ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponse",children:(0,i.jsx)(n.code,{children:"FileResponse"})}),"<",(0,i.jsx)(n.code,{children:"boolean"}),">"]}),"\n",(0,i.jsx)(n.p,{children:"Enable to override output files, even if they already exist."}),"\n",(0,i.jsxs)(n.p,{children:["You may supply a function to this option, which can take the arguments ",(0,i.jsx)(n.code,{children:"(fullPath, baseDir, baseName)"})," and returns\na boolean for each file."]}),"\n",(0,i.jsxs)(n.p,{children:["May also be a ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})," which returns a boolean value per file."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponse",children:"FileResponse"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"false"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-5",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L74",children:"types.ts:74"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"loglevel",children:"logLevel"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"logLevel"}),": ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#loglevel-1",children:(0,i.jsx)(n.code,{children:"LogLevel"})})]}),"\n",(0,i.jsx)(n.p,{children:"Determine amount of logs to display."}),"\n",(0,i.jsxs)(n.p,{children:["The values are: ",(0,i.jsx)(n.code,{children:"0 (none) | 1 (debug) | 2 (info) | 3 (warn) | 4 (error)"}),". The provided level will display messages\nof the same level or higher."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#loglevel",children:"LogLevel"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"2 (info)"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-6",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L86",children:"types.ts:86"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"dryrun",children:"dryRun"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"dryRun"}),": ",(0,i.jsx)(n.code,{children:"boolean"})]}),"\n",(0,i.jsx)(n.p,{children:"Don't emit files. This is good for testing your scaffolds and making sure they don't fail, without having to write\nactual file contents or create directories."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"Default"})})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"false"})}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-7",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L94",children:"types.ts:94"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"helpers",children:"helpers"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"helpers"}),": ",(0,i.jsx)(n.code,{children:"Record"}),"<",(0,i.jsx)(n.code,{children:"string"}),", ",(0,i.jsx)(n.code,{children:"HelperDelegate"}),">"]}),"\n",(0,i.jsx)(n.p,{children:"Additional helpers to add to the template parser. Provide an object whose keys are the name of the function to add,\nand the value is the helper function itself. The signature of helpers is as follows:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"(text: string, ...args: any[]) => string\n"})}),"\n",(0,i.jsx)(n.p,{children:"A full example might be:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"Scaffold({\n //...\n helpers: {\n upperKebabCase: (text) => kebabCase(text).toUpperCase()\n }\n})\n"})}),"\n",(0,i.jsx)(n.p,{children:"Which will allow:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{{ upperKebabCase "my value" }}\n'})}),"\n",(0,i.jsx)(n.p,{children:"To transform to:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"MY-VALUE\n"})}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})," for a list of all the built-in available helpers."]}),"\n",(0,i.jsxs)(n.p,{children:["Simple Scaffold uses Handlebars.js, so all the syntax from there is supported. See\n",(0,i.jsx)(n.a,{href:"https://handlebarsjs.com/guide/#custom-helpers",children:"their docs"})," for more information."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://chenasraf.github.io/simple-scaffold/docs/usage/templates%7C",children:"Templates"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-8",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L136",children:"types.ts:136"})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"subdirhelper",children:"subdirHelper"}),"\n",(0,i.jsxs)(n.p,{children:["\u2022 ",(0,i.jsx)(n.code,{children:"Optional"})," ",(0,i.jsx)(n.strong,{children:"subdirHelper"}),": ",(0,i.jsx)(n.code,{children:"string"})]}),"\n",(0,i.jsxs)(n.p,{children:["Default transformer to apply to subdir name when using ",(0,i.jsx)(n.code,{children:"subdir: true"}),". Can be one of the default\ncapitalization helpers, or a custom one you provide to ",(0,i.jsx)(n.code,{children:"helpers"}),". Defaults to ",(0,i.jsx)(n.code,{children:"undefined"}),", which means no\ntransformation is done."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"See"})})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig#subdir",children:"subdir"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-9",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L147",children:"types.ts:147"})}),"\n",(0,i.jsx)(n.h2,{id:"methods",children:"Methods"}),"\n",(0,i.jsx)(n.h3,{id:"beforewrite",children:"beforeWrite"}),"\n",(0,i.jsxs)(n.p,{children:["\u25b8 ",(0,i.jsx)(n.strong,{children:"beforeWrite"}),"(",(0,i.jsx)(n.code,{children:"content"}),", ",(0,i.jsx)(n.code,{children:"rawContent"}),", ",(0,i.jsx)(n.code,{children:"outputPath"}),"): ",(0,i.jsx)(n.code,{children:"undefined"})," | ",(0,i.jsx)(n.code,{children:"string"})," | ",(0,i.jsx)(n.code,{children:"Buffer"})," | ",(0,i.jsx)(n.code,{children:"Promise"}),"<",(0,i.jsx)(n.code,{children:"undefined"})," | ",(0,i.jsx)(n.code,{children:"string"})," | ",(0,i.jsx)(n.code,{children:"Buffer"}),">"]}),"\n",(0,i.jsx)(n.p,{children:"This callback runs right before content is being written to the disk. If you supply this function, you may return\na string that represents the final content of your file, you may process the content as you see fit. For example,\nyou may run formatters on a file, fix output in edge-cases not supported by helpers or data, etc."}),"\n",(0,i.jsxs)(n.p,{children:["If the return value of this function is ",(0,i.jsx)(n.code,{children:"undefined"}),", the original content will be used."]}),"\n",(0,i.jsx)(n.h4,{id:"parameters",children:"Parameters"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{style:{textAlign:"left"},children:"Name"}),(0,i.jsx)(n.th,{style:{textAlign:"left"},children:"Type"}),(0,i.jsx)(n.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"content"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"Buffer"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"The original template after token replacement"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"rawContent"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"Buffer"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"The original template before token replacement"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"outputPath"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:(0,i.jsx)(n.code,{children:"string"})}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"The final output path of the processed file"})]})]})]}),"\n",(0,i.jsx)(n.h4,{id:"returns",children:"Returns"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"undefined"})," | ",(0,i.jsx)(n.code,{children:"string"})," | ",(0,i.jsx)(n.code,{children:"Buffer"})," | ",(0,i.jsx)(n.code,{children:"Promise"}),"<",(0,i.jsx)(n.code,{children:"undefined"})," | ",(0,i.jsx)(n.code,{children:"string"})," | ",(0,i.jsx)(n.code,{children:"Buffer"}),">"]}),"\n",(0,i.jsxs)(n.p,{children:["The final output of the file\ncontents-only, after further modifications - or ",(0,i.jsx)(n.code,{children:"undefined"})," to use the original content (i.e. ",(0,i.jsx)(n.code,{children:"content.toString()"}),")"]}),"\n",(0,i.jsx)(n.h4,{id:"defined-in-10",children:"Defined in"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L163",children:"types.ts:163"})})]})}function a(e={}){const{wrapper:n}={...(0,l.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},3108:(e,n,s)=>{s.d(n,{Z:()=>t,a:()=>r});var i=s(959);const l={},d=i.createContext(l);function r(e){const n=i.useContext(d);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:r(e.components),i.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f6aebfbf.cbd64a46.js b/assets/js/f6aebfbf.97187e87.js similarity index 97% rename from assets/js/f6aebfbf.cbd64a46.js rename to assets/js/f6aebfbf.97187e87.js index 47e2cde..8776675 100644 --- a/assets/js/f6aebfbf.cbd64a46.js +++ b/assets/js/f6aebfbf.97187e87.js @@ -1 +1 @@ -"use strict";(self.webpackChunksimple_scaffold_docs=self.webpackChunksimple_scaffold_docs||[]).push([[306],{2943:(e,l,s)=>{s.r(l),s.d(l,{assets:()=>c,contentTitle:()=>t,default:()=>a,frontMatter:()=>i,metadata:()=>r,toc:()=>h});var n=s(1527),d=s(3108);const i={id:"modules",title:"simple-scaffold",sidebar_label:"Exports",sidebar_position:.5,custom_edit_url:null},t=void 0,r={id:"api/modules",title:"simple-scaffold",description:"Interfaces",source:"@site/docs/api/modules.md",sourceDirName:"api",slug:"/api/modules",permalink:"/simple-scaffold/docs/api/modules",draft:!1,unlisted:!1,editUrl:null,tags:[],version:"current",sidebarPosition:.5,frontMatter:{id:"modules",title:"simple-scaffold",sidebar_label:"Exports",sidebar_position:.5,custom_edit_url:null},sidebar:"docs",previous:{title:"Readme",permalink:"/simple-scaffold/docs/api/"},next:{title:"ScaffoldConfig",permalink:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig"}},c={},h=[{value:"Interfaces",id:"interfaces",level:2},{value:"Main",id:"main",level:2},{value:"Scaffold",id:"scaffold",level:3},{value:"Create files",id:"create-files",level:4},{value:"Helpers",id:"helpers",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Config",id:"config",level:2},{value:"FileResponseHandler",id:"fileresponsehandler",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Type declaration",id:"type-declaration",level:4},{value:"Parameters",id:"parameters-1",level:5},{value:"Returns",id:"returns-1",level:5},{value:"Defined in",id:"defined-in-1",level:4},{value:"FileResponse",id:"fileresponse",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"ScaffoldConfigMap",id:"scaffoldconfigmap",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"ScaffoldConfigFile",id:"scaffoldconfigfile",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"Helpers",id:"helpers-1",level:2},{value:"CaseHelpers",id:"casehelpers",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"DateHelpers",id:"datehelpers",level:3},{value:"Defined in",id:"defined-in-6",level:4},{value:"DefaultHelpers",id:"defaulthelpers",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"Helper",id:"helper",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"Logging (const)",id:"logging-const",level:2},{value:"LogLevel",id:"loglevel",level:3},{value:"Type declaration",id:"type-declaration-1",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"Logging (type)",id:"logging-type",level:2},{value:"LogLevel",id:"loglevel-1",level:3},{value:"Defined in",id:"defined-in-10",level:4},{value:"Other",id:"other",level:2},{value:"ScaffoldCmdConfig",id:"scaffoldcmdconfig",level:3},{value:"Type declaration",id:"type-declaration-2",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"ListCommandCliOptions",id:"listcommandclioptions",level:3},{value:"Defined in",id:"defined-in-12",level:4},{value:"default",id:"default",level:3}];function o(e){const l={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",h5:"h5",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.h2,{id:"interfaces",children:"Interfaces"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"main",children:"Main"}),"\n",(0,n.jsx)(l.h3,{id:"scaffold",children:"Scaffold"}),"\n",(0,n.jsxs)(l.p,{children:["\u25b8 ",(0,n.jsx)(l.strong,{children:"Scaffold"}),"(",(0,n.jsx)(l.code,{children:"config"}),"): ",(0,n.jsx)(l.code,{children:"Promise"}),"<",(0,n.jsx)(l.code,{children:"void"}),">"]}),"\n",(0,n.jsxs)(l.p,{children:["Create a scaffold using given ",(0,n.jsx)(l.code,{children:"options"}),"."]}),"\n",(0,n.jsx)(l.h4,{id:"create-files",children:"Create files"}),"\n",(0,n.jsxs)(l.p,{children:["To create a file structure to output, use any directory and file structure you would like.\nInside folder names, file names or file contents, you may place ",(0,n.jsx)(l.code,{children:"{{ var }}"})," where ",(0,n.jsx)(l.code,{children:"var"})," is either\n",(0,n.jsx)(l.code,{children:"name"})," which is the scaffold name you provided or one of the keys you provided in the ",(0,n.jsx)(l.code,{children:"data"})," option."]}),"\n",(0,n.jsx)(l.p,{children:"The contents and names will be replaced with the transformed values so you can use your original structure as a\nboilerplate for other projects, components, modules, or even single files."}),"\n",(0,n.jsxs)(l.p,{children:["The files will maintain their structure, starting from the directory containing the template (or the template itself\nif it is already a directory), and will output from that directory into the directory defined by ",(0,n.jsx)(l.code,{children:"config.output"}),"."]}),"\n",(0,n.jsx)(l.h4,{id:"helpers",children:"Helpers"}),"\n",(0,n.jsxs)(l.p,{children:["Helpers are functions you can use to transform your ",(0,n.jsx)(l.code,{children:"{{ var }}"})," contents into other values without having to\npre-define the data and use a duplicated key."]}),"\n",(0,n.jsxs)(l.p,{children:["Any functions you provide in ",(0,n.jsx)(l.code,{children:"helpers"})," option will also be available to you to make custom formatting as you see fit\n(for example, formatting a date)"]}),"\n",(0,n.jsxs)(l.p,{children:["For available default values, see ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"}),"."]}),"\n",(0,n.jsx)(l.h4,{id:"parameters",children:"Parameters"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsx)(l.tbody,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"config"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:(0,n.jsx)(l.code,{children:"ScaffoldConfig"})})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The main configuration object"})]})})]}),"\n",(0,n.jsx)(l.h4,{id:"returns",children:"Returns"}),"\n",(0,n.jsxs)(l.p,{children:[(0,n.jsx)(l.code,{children:"Promise"}),"<",(0,n.jsx)(l.code,{children:"void"}),">"]}),"\n",(0,n.jsx)(l.p,{children:"A promise that resolves when the scaffold is complete"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/scaffold.ts#L58",children:"scaffold.ts:58"})}),"\n",(0,n.jsx)(l.h2,{id:"config",children:"Config"}),"\n",(0,n.jsx)(l.h3,{id:"fileresponsehandler",children:"FileResponseHandler"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"FileResponseHandler"}),"<",(0,n.jsx)(l.code,{children:"T"}),">: (",(0,n.jsx)(l.code,{children:"fullPath"}),": ",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.code,{children:"basedir"}),": ",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.code,{children:"basename"}),": ",(0,n.jsx)(l.code,{children:"string"}),") => ",(0,n.jsx)(l.code,{children:"T"})]}),"\n",(0,n.jsxs)(l.p,{children:["A function that takes path information about file, and returns a value of type ",(0,n.jsx)(l.code,{children:"T"})]}),"\n",(0,n.jsx)(l.h4,{id:"type-parameters",children:"Type parameters"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsx)(l.tbody,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"T"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The return type for the function"})]})})]}),"\n",(0,n.jsx)(l.h4,{id:"type-declaration",children:"Type declaration"}),"\n",(0,n.jsxs)(l.p,{children:["\u25b8 (",(0,n.jsx)(l.code,{children:"fullPath"}),", ",(0,n.jsx)(l.code,{children:"basedir"}),", ",(0,n.jsx)(l.code,{children:"basename"}),"): ",(0,n.jsx)(l.code,{children:"T"})]}),"\n",(0,n.jsx)(l.h5,{id:"parameters-1",children:"Parameters"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"fullPath"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The full path of the current file"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"basedir"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The directory containing the current file"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"basename"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The name of the file"})]})]})]}),"\n",(0,n.jsx)(l.h5,{id:"returns-1",children:"Returns"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.code,{children:"T"})}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-1",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L322",children:"types.ts:322"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"fileresponse",children:"FileResponse"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"FileResponse"}),"<",(0,n.jsx)(l.code,{children:"T"}),">: ",(0,n.jsx)(l.code,{children:"T"})," | ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:(0,n.jsx)(l.code,{children:"FileResponseHandler"})}),"<",(0,n.jsx)(l.code,{children:"T"}),">"]}),"\n",(0,n.jsx)(l.p,{children:"Represents a response for file path information.\nCan either be:"}),"\n",(0,n.jsxs)(l.ol,{children:["\n",(0,n.jsxs)(l.li,{children:[(0,n.jsx)(l.code,{children:"T"})," - static value"]}),"\n",(0,n.jsxs)(l.li,{children:["A function with the following signature which returns ",(0,n.jsx)(l.code,{children:"T"}),":","\n",(0,n.jsx)(l.pre,{children:(0,n.jsx)(l.code,{className:"language-typescript",children:"(fullPath: string, basedir: string, basename: string) => T\n"})}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})}),"\n",(0,n.jsx)(l.h4,{id:"type-parameters-1",children:"Type parameters"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsx)(l.tr,{children:(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"})})}),(0,n.jsx)(l.tbody,{children:(0,n.jsx)(l.tr,{children:(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"T"})})})})]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-2",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L338",children:"types.ts:338"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"scaffoldconfigmap",children:"ScaffoldConfigMap"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"ScaffoldConfigMap"}),": ",(0,n.jsx)(l.code,{children:"Record"}),"<",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:(0,n.jsx)(l.code,{children:"ScaffoldConfig"})}),">"]}),"\n",(0,n.jsx)(l.p,{children:"A mapping of scaffold template keys to their configurations."}),"\n",(0,n.jsxs)(l.p,{children:["Each configuration is a ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})," object."]}),"\n",(0,n.jsx)(l.p,{children:"The key is the name of the template, and the value is the configuration for that template."}),"\n",(0,n.jsx)(l.p,{children:'When no template key is provided to the scaffold command, the "default" template is used.'}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-3",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L400",children:"types.ts:400"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"scaffoldconfigfile",children:"ScaffoldConfigFile"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"ScaffoldConfigFile"}),": ",(0,n.jsx)(l.code,{children:"AsyncResolver"}),"<",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldcmdconfig",children:(0,n.jsx)(l.code,{children:"ScaffoldCmdConfig"})}),", ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:(0,n.jsx)(l.code,{children:"ScaffoldConfigMap"})}),">"]}),"\n",(0,n.jsx)(l.p,{children:"The scaffold config file is either:"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["A ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:"ScaffoldConfigMap"})," object"]}),"\n",(0,n.jsxs)(l.li,{children:["A function that returns a ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:"ScaffoldConfigMap"})," object"]}),"\n",(0,n.jsxs)(l.li,{children:["A promise that resolves to a ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:"ScaffoldConfigMap"})," object"]}),"\n",(0,n.jsxs)(l.li,{children:["A function that returns a promise that resolves to a ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:"ScaffoldConfigMap"})," object"]}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-4",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L411",children:"types.ts:411"})}),"\n",(0,n.jsx)(l.h2,{id:"helpers-1",children:"Helpers"}),"\n",(0,n.jsx)(l.h3,{id:"casehelpers",children:"CaseHelpers"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"CaseHelpers"}),": ",(0,n.jsx)(l.code,{children:'"camelCase"'})," | ",(0,n.jsx)(l.code,{children:'"hyphenCase"'})," | ",(0,n.jsx)(l.code,{children:'"kebabCase"'})," | ",(0,n.jsx)(l.code,{children:'"lowerCase"'})," | ",(0,n.jsx)(l.code,{children:'"pascalCase"'})," | ",(0,n.jsx)(l.code,{children:'"snakeCase"'})," | ",(0,n.jsx)(l.code,{children:'"startCase"'})," | ",(0,n.jsx)(l.code,{children:'"upperCase"'})]}),"\n",(0,n.jsx)(l.p,{children:"The names of the available helper functions that relate to text capitalization."}),"\n",(0,n.jsxs)(l.p,{children:["These are available for ",(0,n.jsx)(l.code,{children:"subdirHelper"}),"."]}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{children:"Helper name"}),(0,n.jsx)(l.th,{children:"Example code"}),(0,n.jsx)(l.th,{children:"Example output"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:"[None]"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ name }}"})}),(0,n.jsx)(l.td,{children:"my name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"camelCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ camelCase name }}"})}),(0,n.jsx)(l.td,{children:"myName"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"snakeCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ snakeCase name }}"})}),(0,n.jsx)(l.td,{children:"my_name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"startCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ startCase name }}"})}),(0,n.jsx)(l.td,{children:"My Name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"kebabCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ kebabCase name }}"})}),(0,n.jsx)(l.td,{children:"my-name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"hyphenCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ hyphenCase name }}"})}),(0,n.jsx)(l.td,{children:"my-name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"pascalCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ pascalCase name }}"})}),(0,n.jsx)(l.td,{children:"MyName"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"upperCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ upperCase name }}"})}),(0,n.jsx)(l.td,{children:"MY NAME"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"lowerCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ lowerCase name }}"})}),(0,n.jsx)(l.td,{children:"my name"})]})]})]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig#subdirhelper",children:"ScaffoldConfig.subdirHelper"})}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-5",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L197",children:"types.ts:197"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"datehelpers",children:"DateHelpers"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"DateHelpers"}),": ",(0,n.jsx)(l.code,{children:'"date"'})," | ",(0,n.jsx)(l.code,{children:'"now"'})]}),"\n",(0,n.jsx)(l.p,{children:"The names of the available helper functions that relate to dates."}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{children:"Helper name"}),(0,n.jsx)(l.th,{children:"Description"}),(0,n.jsx)(l.th,{children:"Example code"}),(0,n.jsx)(l.th,{children:"Example output"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"now"})}),(0,n.jsx)(l.td,{children:"Current date with format"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ now "yyyy-MM-dd HH:mm" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2042-01-01 15:00"})})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsxs)(l.td,{children:[(0,n.jsx)(l.code,{children:"now"})," (with offset)"]}),(0,n.jsx)(l.td,{children:"Current date with format, and with offset"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ now "yyyy-MM-dd HH:mm" -1 "hours" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2042-01-01 14:00"})})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"date"})}),(0,n.jsx)(l.td,{children:"Custom date with format"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ date "2042-01-01T15:00:00Z" "yyyy-MM-dd HH:mm" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2042-01-01 15:00"})})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsxs)(l.td,{children:[(0,n.jsx)(l.code,{children:"date"})," (with offset)"]}),(0,n.jsx)(l.td,{children:"Custom date with format, and with offset"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ date "2042-01-01T15:00:00Z" "yyyy-MM-dd HH:mm" -1 "days" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2041-31-12 15:00"})})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsxs)(l.td,{children:[(0,n.jsx)(l.code,{children:"date"})," (with date from ",(0,n.jsx)(l.code,{children:"--data"}),")"]}),(0,n.jsxs)(l.td,{children:["Custom date with format, with data from the ",(0,n.jsx)(l.code,{children:"data"})," config option"]}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ date myCustomDate "yyyy-MM-dd HH:mm" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2042-01-01 12:00"})})]})]})]}),"\n",(0,n.jsx)(l.p,{children:"Further details:"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["\n",(0,n.jsxs)(l.p,{children:["We use ",(0,n.jsx)(l.a,{href:"https://date-fns.org/docs/",children:(0,n.jsx)(l.code,{children:"date-fns"})})," for parsing/manipulating the dates. If you want\nmore information on the date tokens to use, refer to\n",(0,n.jsx)(l.a,{href:"https://date-fns.org/docs/format",children:"their format documentation"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(l.li,{children:["\n",(0,n.jsx)(l.p,{children:"The date helper format takes the following arguments:"}),"\n",(0,n.jsx)(l.pre,{children:(0,n.jsx)(l.code,{className:"language-typescript",children:'(\n date: string,\n format: string,\n offsetAmount?: number,\n offsetType?: "years" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds"\n)\n'})}),"\n"]}),"\n",(0,n.jsxs)(l.li,{children:["\n",(0,n.jsxs)(l.p,{children:[(0,n.jsx)(l.strong,{children:"The now helper"})," (for current time) takes the same arguments, minus the first one (",(0,n.jsx)(l.code,{children:"date"}),") as it is implicitly\nthe current date."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-6",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L244",children:"types.ts:244"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"defaulthelpers",children:"DefaultHelpers"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"DefaultHelpers"}),": ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:(0,n.jsx)(l.code,{children:"CaseHelpers"})})," | ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:(0,n.jsx)(l.code,{children:"DateHelpers"})})]}),"\n",(0,n.jsx)(l.p,{children:"The names of all the available helper functions in templates.\nSimple-Scaffold provides some built-in text transformation filters usable by Handlebars.js."}),"\n",(0,n.jsxs)(l.p,{children:["For example, you may use ",(0,n.jsx)(l.code,{children:"{{ snakeCase name }}"})," inside a template file or filename, and it will\nreplace ",(0,n.jsx)(l.code,{children:"My Name"})," with ",(0,n.jsx)(l.code,{children:"my_name"})," when producing the final value."]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-7",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L259",children:"types.ts:259"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"helper",children:"Helper"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"Helper"}),": ",(0,n.jsx)(l.code,{children:"HelperDelegate"})]}),"\n",(0,n.jsxs)(l.p,{children:["Helper function, see ",(0,n.jsx)(l.a,{href:"https://handlebarsjs.com/guide/#custom-helpers",children:"https://handlebarsjs.com/guide/#custom-helpers"})]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-8",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L266",children:"types.ts:266"})}),"\n",(0,n.jsx)(l.h2,{id:"logging-const",children:"Logging (const)"}),"\n",(0,n.jsx)(l.h3,{id:"loglevel",children:"LogLevel"}),"\n",(0,n.jsxs)(l.p,{children:["\u2022 ",(0,n.jsx)(l.code,{children:"Const"})," ",(0,n.jsx)(l.strong,{children:"LogLevel"}),": ",(0,n.jsx)(l.code,{children:"Object"})]}),"\n",(0,n.jsxs)(l.p,{children:["The amount of information to log when generating scaffold.\nWhen not ",(0,n.jsx)(l.code,{children:"none"}),", the selected level will be the lowest level included."]}),"\n",(0,n.jsxs)(l.p,{children:["For example, level ",(0,n.jsx)(l.code,{children:"info"})," will include ",(0,n.jsx)(l.code,{children:"info"}),", ",(0,n.jsx)(l.code,{children:"warning"})," and ",(0,n.jsx)(l.code,{children:"error"}),", but not ",(0,n.jsx)(l.code,{children:"debug"}),"; and ",(0,n.jsx)(l.code,{children:"warning"})," will only\nshow ",(0,n.jsx)(l.code,{children:"warning"})," and ",(0,n.jsx)(l.code,{children:"error"}),", but not ",(0,n.jsx)(l.code,{children:"info"})," or ",(0,n.jsx)(l.code,{children:"debug"}),"."]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"Default"})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.code,{children:"info"})}),"\n",(0,n.jsx)(l.h4,{id:"type-declaration-1",children:"Type declaration"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"none"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"none"'})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Silent output"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"debug"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"debug"'})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Debugging information. Very verbose and only recommended for troubleshooting."})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"info"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"info"'})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:["The regular level of logging. Major actions are logged to show the scaffold progress. ",(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"Default"})})," ",(0,n.jsx)(l.code,{children:"ts "})]})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"warning"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"warning"'})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Warnings such as when file fails to replace token values properly in template."})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"error"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"error"'})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Errors, such as missing files, bad replacement token syntax, or un-writable directories."})]})]})]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-9",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L280",children:"types.ts:280"})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L308",children:"types.ts:308"})}),"\n",(0,n.jsx)(l.h2,{id:"logging-type",children:"Logging (type)"}),"\n",(0,n.jsx)(l.h3,{id:"loglevel-1",children:"LogLevel"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"LogLevel"}),": typeof ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#loglevel",children:(0,n.jsx)(l.code,{children:"LogLevel"})}),"[keyof typeof ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#loglevel",children:(0,n.jsx)(l.code,{children:"LogLevel"})}),"]"]}),"\n",(0,n.jsxs)(l.p,{children:["The amount of information to log when generating scaffold.\nWhen not ",(0,n.jsx)(l.code,{children:"none"}),", the selected level will be the lowest level included."]}),"\n",(0,n.jsxs)(l.p,{children:["For example, level ",(0,n.jsx)(l.code,{children:"info"})," will include ",(0,n.jsx)(l.code,{children:"info"}),", ",(0,n.jsx)(l.code,{children:"warning"})," and ",(0,n.jsx)(l.code,{children:"error"}),", but not ",(0,n.jsx)(l.code,{children:"debug"}),"; and ",(0,n.jsx)(l.code,{children:"warning"})," will only\nshow ",(0,n.jsx)(l.code,{children:"warning"})," and ",(0,n.jsx)(l.code,{children:"error"}),", but not ",(0,n.jsx)(l.code,{children:"info"})," or ",(0,n.jsx)(l.code,{children:"debug"}),"."]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"Default"})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.code,{children:"info"})}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-10",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L280",children:"types.ts:280"})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L308",children:"types.ts:308"})}),"\n",(0,n.jsx)(l.h2,{id:"other",children:"Other"}),"\n",(0,n.jsx)(l.h3,{id:"scaffoldcmdconfig",children:"ScaffoldCmdConfig"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"ScaffoldCmdConfig"}),": ",(0,n.jsx)(l.code,{children:"Object"})]}),"\n",(0,n.jsxs)(l.p,{children:["The Scaffold config for CLI\nContains less and more specific options than ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"}),"."]}),"\n",(0,n.jsxs)(l.p,{children:["For more information about each option, see ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"}),"."]}),"\n",(0,n.jsx)(l.h4,{id:"type-declaration-2",children:"Type declaration"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"name"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The name of the scaffold template to use."})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"templates"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:[(0,n.jsx)(l.code,{children:"string"}),"[]"]}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The templates to use for generation"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"output"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The output path to write to"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"subdir"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Whether to create subdir with the input name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"subdirHelper?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:["Default transformer to apply to subdir name when using ",(0,n.jsx)(l.code,{children:"subdir: true"})]})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"data?"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:[(0,n.jsx)(l.code,{children:"Record"}),"<",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.code,{children:"string"}),">"]}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Add custom data to the templates"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"appendData?"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:[(0,n.jsx)(l.code,{children:"Record"}),"<",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.code,{children:"string"}),">"]}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Add custom data to the template in a CLI-friendly syntax (and not JSON)"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"overwrite"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Enable to override output files, even if they already exist"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"quiet"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:["Silence logs, same as ",(0,n.jsx)(l.code,{children:'logLevel: "none"'})]})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"logLevel"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#loglevel-1",children:(0,n.jsx)(l.code,{children:"LogLevel"})})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:["Determine amount of logs to display. ",(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})," ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#loglevel",children:"LogLevel"})]})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"dryRun"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Don't emit files. This is good for testing your scaffolds and making sure they don't fail, without having to write actual file contents or create directories."})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"config?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Config file path to use"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"key?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The key of the template to use"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"git?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The git repository to use to fetch the config file"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"version"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Display version"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"beforeWrite?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Run a script before writing the files. This can be a command or a path to a file. The file contents will be passed to the given command."})]})]})]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-11",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L346",children:"types.ts:346"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"listcommandclioptions",children:"ListCommandCliOptions"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"ListCommandCliOptions"}),": ",(0,n.jsx)(l.code,{children:"Pick"}),"<",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldcmdconfig",children:(0,n.jsx)(l.code,{children:"ScaffoldCmdConfig"})}),", ",(0,n.jsx)(l.code,{children:'"config"'})," | ",(0,n.jsx)(l.code,{children:'"git"'})," | ",(0,n.jsx)(l.code,{children:'"logLevel"'})," | ",(0,n.jsx)(l.code,{children:'"quiet"'}),">"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-12",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/80c92bf/src/types.ts#L431",children:"types.ts:431"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"default",children:"default"}),"\n",(0,n.jsxs)(l.p,{children:["Renames and re-exports ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffold",children:"Scaffold"})]})]})}function a(e={}){const{wrapper:l}={...(0,d.a)(),...e.components};return l?(0,n.jsx)(l,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},3108:(e,l,s)=>{s.d(l,{Z:()=>r,a:()=>t});var n=s(959);const d={},i=n.createContext(d);function t(e){const l=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(l):{...l,...e}}),[l,e])}function r(e){let l;return l=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),n.createElement(i.Provider,{value:l},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunksimple_scaffold_docs=self.webpackChunksimple_scaffold_docs||[]).push([[306],{2943:(e,l,s)=>{s.r(l),s.d(l,{assets:()=>c,contentTitle:()=>t,default:()=>a,frontMatter:()=>i,metadata:()=>r,toc:()=>h});var n=s(1527),d=s(3108);const i={id:"modules",title:"simple-scaffold",sidebar_label:"Exports",sidebar_position:.5,custom_edit_url:null},t=void 0,r={id:"api/modules",title:"simple-scaffold",description:"Interfaces",source:"@site/docs/api/modules.md",sourceDirName:"api",slug:"/api/modules",permalink:"/simple-scaffold/docs/api/modules",draft:!1,unlisted:!1,editUrl:null,tags:[],version:"current",sidebarPosition:.5,frontMatter:{id:"modules",title:"simple-scaffold",sidebar_label:"Exports",sidebar_position:.5,custom_edit_url:null},sidebar:"docs",previous:{title:"Readme",permalink:"/simple-scaffold/docs/api/"},next:{title:"ScaffoldConfig",permalink:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig"}},c={},h=[{value:"Interfaces",id:"interfaces",level:2},{value:"Main",id:"main",level:2},{value:"Scaffold",id:"scaffold",level:3},{value:"Create files",id:"create-files",level:4},{value:"Helpers",id:"helpers",level:4},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"Defined in",id:"defined-in",level:4},{value:"Config",id:"config",level:2},{value:"FileResponseHandler",id:"fileresponsehandler",level:3},{value:"Type parameters",id:"type-parameters",level:4},{value:"Type declaration",id:"type-declaration",level:4},{value:"Parameters",id:"parameters-1",level:5},{value:"Returns",id:"returns-1",level:5},{value:"Defined in",id:"defined-in-1",level:4},{value:"FileResponse",id:"fileresponse",level:3},{value:"Type parameters",id:"type-parameters-1",level:4},{value:"Defined in",id:"defined-in-2",level:4},{value:"ScaffoldConfigMap",id:"scaffoldconfigmap",level:3},{value:"Defined in",id:"defined-in-3",level:4},{value:"ScaffoldConfigFile",id:"scaffoldconfigfile",level:3},{value:"Defined in",id:"defined-in-4",level:4},{value:"Helpers",id:"helpers-1",level:2},{value:"CaseHelpers",id:"casehelpers",level:3},{value:"Defined in",id:"defined-in-5",level:4},{value:"DateHelpers",id:"datehelpers",level:3},{value:"Defined in",id:"defined-in-6",level:4},{value:"DefaultHelpers",id:"defaulthelpers",level:3},{value:"Defined in",id:"defined-in-7",level:4},{value:"Helper",id:"helper",level:3},{value:"Defined in",id:"defined-in-8",level:4},{value:"Logging (const)",id:"logging-const",level:2},{value:"LogLevel",id:"loglevel",level:3},{value:"Type declaration",id:"type-declaration-1",level:4},{value:"Defined in",id:"defined-in-9",level:4},{value:"Logging (type)",id:"logging-type",level:2},{value:"LogLevel",id:"loglevel-1",level:3},{value:"Defined in",id:"defined-in-10",level:4},{value:"Other",id:"other",level:2},{value:"ScaffoldCmdConfig",id:"scaffoldcmdconfig",level:3},{value:"Type declaration",id:"type-declaration-2",level:4},{value:"Defined in",id:"defined-in-11",level:4},{value:"ListCommandCliOptions",id:"listcommandclioptions",level:3},{value:"Defined in",id:"defined-in-12",level:4},{value:"default",id:"default",level:3}];function o(e){const l={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",h5:"h5",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.h2,{id:"interfaces",children:"Interfaces"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n"]}),"\n",(0,n.jsx)(l.h2,{id:"main",children:"Main"}),"\n",(0,n.jsx)(l.h3,{id:"scaffold",children:"Scaffold"}),"\n",(0,n.jsxs)(l.p,{children:["\u25b8 ",(0,n.jsx)(l.strong,{children:"Scaffold"}),"(",(0,n.jsx)(l.code,{children:"config"}),"): ",(0,n.jsx)(l.code,{children:"Promise"}),"<",(0,n.jsx)(l.code,{children:"void"}),">"]}),"\n",(0,n.jsxs)(l.p,{children:["Create a scaffold using given ",(0,n.jsx)(l.code,{children:"options"}),"."]}),"\n",(0,n.jsx)(l.h4,{id:"create-files",children:"Create files"}),"\n",(0,n.jsxs)(l.p,{children:["To create a file structure to output, use any directory and file structure you would like.\nInside folder names, file names or file contents, you may place ",(0,n.jsx)(l.code,{children:"{{ var }}"})," where ",(0,n.jsx)(l.code,{children:"var"})," is either\n",(0,n.jsx)(l.code,{children:"name"})," which is the scaffold name you provided or one of the keys you provided in the ",(0,n.jsx)(l.code,{children:"data"})," option."]}),"\n",(0,n.jsx)(l.p,{children:"The contents and names will be replaced with the transformed values so you can use your original structure as a\nboilerplate for other projects, components, modules, or even single files."}),"\n",(0,n.jsxs)(l.p,{children:["The files will maintain their structure, starting from the directory containing the template (or the template itself\nif it is already a directory), and will output from that directory into the directory defined by ",(0,n.jsx)(l.code,{children:"config.output"}),"."]}),"\n",(0,n.jsx)(l.h4,{id:"helpers",children:"Helpers"}),"\n",(0,n.jsxs)(l.p,{children:["Helpers are functions you can use to transform your ",(0,n.jsx)(l.code,{children:"{{ var }}"})," contents into other values without having to\npre-define the data and use a duplicated key."]}),"\n",(0,n.jsxs)(l.p,{children:["Any functions you provide in ",(0,n.jsx)(l.code,{children:"helpers"})," option will also be available to you to make custom formatting as you see fit\n(for example, formatting a date)"]}),"\n",(0,n.jsxs)(l.p,{children:["For available default values, see ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"}),"."]}),"\n",(0,n.jsx)(l.h4,{id:"parameters",children:"Parameters"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsx)(l.tbody,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"config"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:(0,n.jsx)(l.code,{children:"ScaffoldConfig"})})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The main configuration object"})]})})]}),"\n",(0,n.jsx)(l.h4,{id:"returns",children:"Returns"}),"\n",(0,n.jsxs)(l.p,{children:[(0,n.jsx)(l.code,{children:"Promise"}),"<",(0,n.jsx)(l.code,{children:"void"}),">"]}),"\n",(0,n.jsx)(l.p,{children:"A promise that resolves when the scaffold is complete"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/scaffold.ts#L58",children:"scaffold.ts:58"})}),"\n",(0,n.jsx)(l.h2,{id:"config",children:"Config"}),"\n",(0,n.jsx)(l.h3,{id:"fileresponsehandler",children:"FileResponseHandler"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"FileResponseHandler"}),"<",(0,n.jsx)(l.code,{children:"T"}),">: (",(0,n.jsx)(l.code,{children:"fullPath"}),": ",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.code,{children:"basedir"}),": ",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.code,{children:"basename"}),": ",(0,n.jsx)(l.code,{children:"string"}),") => ",(0,n.jsx)(l.code,{children:"T"})]}),"\n",(0,n.jsxs)(l.p,{children:["A function that takes path information about file, and returns a value of type ",(0,n.jsx)(l.code,{children:"T"})]}),"\n",(0,n.jsx)(l.h4,{id:"type-parameters",children:"Type parameters"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsx)(l.tbody,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"T"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The return type for the function"})]})})]}),"\n",(0,n.jsx)(l.h4,{id:"type-declaration",children:"Type declaration"}),"\n",(0,n.jsxs)(l.p,{children:["\u25b8 (",(0,n.jsx)(l.code,{children:"fullPath"}),", ",(0,n.jsx)(l.code,{children:"basedir"}),", ",(0,n.jsx)(l.code,{children:"basename"}),"): ",(0,n.jsx)(l.code,{children:"T"})]}),"\n",(0,n.jsx)(l.h5,{id:"parameters-1",children:"Parameters"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"fullPath"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The full path of the current file"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"basedir"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The directory containing the current file"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"basename"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The name of the file"})]})]})]}),"\n",(0,n.jsx)(l.h5,{id:"returns-1",children:"Returns"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.code,{children:"T"})}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-1",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L322",children:"types.ts:322"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"fileresponse",children:"FileResponse"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"FileResponse"}),"<",(0,n.jsx)(l.code,{children:"T"}),">: ",(0,n.jsx)(l.code,{children:"T"})," | ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:(0,n.jsx)(l.code,{children:"FileResponseHandler"})}),"<",(0,n.jsx)(l.code,{children:"T"}),">"]}),"\n",(0,n.jsx)(l.p,{children:"Represents a response for file path information.\nCan either be:"}),"\n",(0,n.jsxs)(l.ol,{children:["\n",(0,n.jsxs)(l.li,{children:[(0,n.jsx)(l.code,{children:"T"})," - static value"]}),"\n",(0,n.jsxs)(l.li,{children:["A function with the following signature which returns ",(0,n.jsx)(l.code,{children:"T"}),":","\n",(0,n.jsx)(l.pre,{children:(0,n.jsx)(l.code,{className:"language-typescript",children:"(fullPath: string, basedir: string, basename: string) => T\n"})}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#fileresponsehandler",children:"FileResponseHandler"})}),"\n",(0,n.jsx)(l.h4,{id:"type-parameters-1",children:"Type parameters"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsx)(l.tr,{children:(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"})})}),(0,n.jsx)(l.tbody,{children:(0,n.jsx)(l.tr,{children:(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"T"})})})})]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-2",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L338",children:"types.ts:338"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"scaffoldconfigmap",children:"ScaffoldConfigMap"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"ScaffoldConfigMap"}),": ",(0,n.jsx)(l.code,{children:"Record"}),"<",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:(0,n.jsx)(l.code,{children:"ScaffoldConfig"})}),">"]}),"\n",(0,n.jsx)(l.p,{children:"A mapping of scaffold template keys to their configurations."}),"\n",(0,n.jsxs)(l.p,{children:["Each configuration is a ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})," object."]}),"\n",(0,n.jsx)(l.p,{children:"The key is the name of the template, and the value is the configuration for that template."}),"\n",(0,n.jsx)(l.p,{children:'When no template key is provided to the scaffold command, the "default" template is used.'}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-3",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L400",children:"types.ts:400"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"scaffoldconfigfile",children:"ScaffoldConfigFile"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"ScaffoldConfigFile"}),": ",(0,n.jsx)(l.code,{children:"AsyncResolver"}),"<",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldcmdconfig",children:(0,n.jsx)(l.code,{children:"ScaffoldCmdConfig"})}),", ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:(0,n.jsx)(l.code,{children:"ScaffoldConfigMap"})}),">"]}),"\n",(0,n.jsx)(l.p,{children:"The scaffold config file is either:"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["A ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:"ScaffoldConfigMap"})," object"]}),"\n",(0,n.jsxs)(l.li,{children:["A function that returns a ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:"ScaffoldConfigMap"})," object"]}),"\n",(0,n.jsxs)(l.li,{children:["A promise that resolves to a ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:"ScaffoldConfigMap"})," object"]}),"\n",(0,n.jsxs)(l.li,{children:["A function that returns a promise that resolves to a ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldconfigmap",children:"ScaffoldConfigMap"})," object"]}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-4",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L411",children:"types.ts:411"})}),"\n",(0,n.jsx)(l.h2,{id:"helpers-1",children:"Helpers"}),"\n",(0,n.jsx)(l.h3,{id:"casehelpers",children:"CaseHelpers"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"CaseHelpers"}),": ",(0,n.jsx)(l.code,{children:'"camelCase"'})," | ",(0,n.jsx)(l.code,{children:'"hyphenCase"'})," | ",(0,n.jsx)(l.code,{children:'"kebabCase"'})," | ",(0,n.jsx)(l.code,{children:'"lowerCase"'})," | ",(0,n.jsx)(l.code,{children:'"pascalCase"'})," | ",(0,n.jsx)(l.code,{children:'"snakeCase"'})," | ",(0,n.jsx)(l.code,{children:'"startCase"'})," | ",(0,n.jsx)(l.code,{children:'"upperCase"'})]}),"\n",(0,n.jsx)(l.p,{children:"The names of the available helper functions that relate to text capitalization."}),"\n",(0,n.jsxs)(l.p,{children:["These are available for ",(0,n.jsx)(l.code,{children:"subdirHelper"}),"."]}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{children:"Helper name"}),(0,n.jsx)(l.th,{children:"Example code"}),(0,n.jsx)(l.th,{children:"Example output"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:"[None]"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ name }}"})}),(0,n.jsx)(l.td,{children:"my name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"camelCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ camelCase name }}"})}),(0,n.jsx)(l.td,{children:"myName"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"snakeCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ snakeCase name }}"})}),(0,n.jsx)(l.td,{children:"my_name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"startCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ startCase name }}"})}),(0,n.jsx)(l.td,{children:"My Name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"kebabCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ kebabCase name }}"})}),(0,n.jsx)(l.td,{children:"my-name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"hyphenCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ hyphenCase name }}"})}),(0,n.jsx)(l.td,{children:"my-name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"pascalCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ pascalCase name }}"})}),(0,n.jsx)(l.td,{children:"MyName"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"upperCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ upperCase name }}"})}),(0,n.jsx)(l.td,{children:"MY NAME"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"lowerCase"})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"{{ lowerCase name }}"})}),(0,n.jsx)(l.td,{children:"my name"})]})]})]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig#subdirhelper",children:"ScaffoldConfig.subdirHelper"})}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-5",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L197",children:"types.ts:197"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"datehelpers",children:"DateHelpers"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"DateHelpers"}),": ",(0,n.jsx)(l.code,{children:'"date"'})," | ",(0,n.jsx)(l.code,{children:'"now"'})]}),"\n",(0,n.jsx)(l.p,{children:"The names of the available helper functions that relate to dates."}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{children:"Helper name"}),(0,n.jsx)(l.th,{children:"Description"}),(0,n.jsx)(l.th,{children:"Example code"}),(0,n.jsx)(l.th,{children:"Example output"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"now"})}),(0,n.jsx)(l.td,{children:"Current date with format"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ now "yyyy-MM-dd HH:mm" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2042-01-01 15:00"})})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsxs)(l.td,{children:[(0,n.jsx)(l.code,{children:"now"})," (with offset)"]}),(0,n.jsx)(l.td,{children:"Current date with format, and with offset"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ now "yyyy-MM-dd HH:mm" -1 "hours" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2042-01-01 14:00"})})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"date"})}),(0,n.jsx)(l.td,{children:"Custom date with format"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ date "2042-01-01T15:00:00Z" "yyyy-MM-dd HH:mm" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2042-01-01 15:00"})})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsxs)(l.td,{children:[(0,n.jsx)(l.code,{children:"date"})," (with offset)"]}),(0,n.jsx)(l.td,{children:"Custom date with format, and with offset"}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ date "2042-01-01T15:00:00Z" "yyyy-MM-dd HH:mm" -1 "days" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2041-31-12 15:00"})})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsxs)(l.td,{children:[(0,n.jsx)(l.code,{children:"date"})," (with date from ",(0,n.jsx)(l.code,{children:"--data"}),")"]}),(0,n.jsxs)(l.td,{children:["Custom date with format, with data from the ",(0,n.jsx)(l.code,{children:"data"})," config option"]}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:'{{ date myCustomDate "yyyy-MM-dd HH:mm" }}'})}),(0,n.jsx)(l.td,{children:(0,n.jsx)(l.code,{children:"2042-01-01 12:00"})})]})]})]}),"\n",(0,n.jsx)(l.p,{children:"Further details:"}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsxs)(l.li,{children:["\n",(0,n.jsxs)(l.p,{children:["We use ",(0,n.jsx)(l.a,{href:"https://date-fns.org/docs/",children:(0,n.jsx)(l.code,{children:"date-fns"})})," for parsing/manipulating the dates. If you want\nmore information on the date tokens to use, refer to\n",(0,n.jsx)(l.a,{href:"https://date-fns.org/docs/format",children:"their format documentation"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(l.li,{children:["\n",(0,n.jsx)(l.p,{children:"The date helper format takes the following arguments:"}),"\n",(0,n.jsx)(l.pre,{children:(0,n.jsx)(l.code,{className:"language-typescript",children:'(\n date: string,\n format: string,\n offsetAmount?: number,\n offsetType?: "years" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds"\n)\n'})}),"\n"]}),"\n",(0,n.jsxs)(l.li,{children:["\n",(0,n.jsxs)(l.p,{children:[(0,n.jsx)(l.strong,{children:"The now helper"})," (for current time) takes the same arguments, minus the first one (",(0,n.jsx)(l.code,{children:"date"}),") as it is implicitly\nthe current date."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#defaulthelpers",children:"DefaultHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-6",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L244",children:"types.ts:244"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"defaulthelpers",children:"DefaultHelpers"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"DefaultHelpers"}),": ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:(0,n.jsx)(l.code,{children:"CaseHelpers"})})," | ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:(0,n.jsx)(l.code,{children:"DateHelpers"})})]}),"\n",(0,n.jsx)(l.p,{children:"The names of all the available helper functions in templates.\nSimple-Scaffold provides some built-in text transformation filters usable by Handlebars.js."}),"\n",(0,n.jsxs)(l.p,{children:["For example, you may use ",(0,n.jsx)(l.code,{children:"{{ snakeCase name }}"})," inside a template file or filename, and it will\nreplace ",(0,n.jsx)(l.code,{children:"My Name"})," with ",(0,n.jsx)(l.code,{children:"my_name"})," when producing the final value."]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})}),"\n",(0,n.jsxs)(l.ul,{children:["\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#casehelpers",children:"CaseHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#datehelpers",children:"DateHelpers"})}),"\n",(0,n.jsx)(l.li,{children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"})}),"\n"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-7",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L259",children:"types.ts:259"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"helper",children:"Helper"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"Helper"}),": ",(0,n.jsx)(l.code,{children:"HelperDelegate"})]}),"\n",(0,n.jsxs)(l.p,{children:["Helper function, see ",(0,n.jsx)(l.a,{href:"https://handlebarsjs.com/guide/#custom-helpers",children:"https://handlebarsjs.com/guide/#custom-helpers"})]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-8",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L266",children:"types.ts:266"})}),"\n",(0,n.jsx)(l.h2,{id:"logging-const",children:"Logging (const)"}),"\n",(0,n.jsx)(l.h3,{id:"loglevel",children:"LogLevel"}),"\n",(0,n.jsxs)(l.p,{children:["\u2022 ",(0,n.jsx)(l.code,{children:"Const"})," ",(0,n.jsx)(l.strong,{children:"LogLevel"}),": ",(0,n.jsx)(l.code,{children:"Object"})]}),"\n",(0,n.jsxs)(l.p,{children:["The amount of information to log when generating scaffold.\nWhen not ",(0,n.jsx)(l.code,{children:"none"}),", the selected level will be the lowest level included."]}),"\n",(0,n.jsxs)(l.p,{children:["For example, level ",(0,n.jsx)(l.code,{children:"info"})," will include ",(0,n.jsx)(l.code,{children:"info"}),", ",(0,n.jsx)(l.code,{children:"warning"})," and ",(0,n.jsx)(l.code,{children:"error"}),", but not ",(0,n.jsx)(l.code,{children:"debug"}),"; and ",(0,n.jsx)(l.code,{children:"warning"})," will only\nshow ",(0,n.jsx)(l.code,{children:"warning"})," and ",(0,n.jsx)(l.code,{children:"error"}),", but not ",(0,n.jsx)(l.code,{children:"info"})," or ",(0,n.jsx)(l.code,{children:"debug"}),"."]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"Default"})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.code,{children:"info"})}),"\n",(0,n.jsx)(l.h4,{id:"type-declaration-1",children:"Type declaration"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"none"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"none"'})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Silent output"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"debug"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"debug"'})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Debugging information. Very verbose and only recommended for troubleshooting."})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"info"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"info"'})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:["The regular level of logging. Major actions are logged to show the scaffold progress. ",(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"Default"})})," ",(0,n.jsx)(l.code,{children:"ts "})]})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"warning"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"warning"'})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Warnings such as when file fails to replace token values properly in template."})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"error"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:'"error"'})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Errors, such as missing files, bad replacement token syntax, or un-writable directories."})]})]})]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-9",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L280",children:"types.ts:280"})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L308",children:"types.ts:308"})}),"\n",(0,n.jsx)(l.h2,{id:"logging-type",children:"Logging (type)"}),"\n",(0,n.jsx)(l.h3,{id:"loglevel-1",children:"LogLevel"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"LogLevel"}),": typeof ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#loglevel",children:(0,n.jsx)(l.code,{children:"LogLevel"})}),"[keyof typeof ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#loglevel",children:(0,n.jsx)(l.code,{children:"LogLevel"})}),"]"]}),"\n",(0,n.jsxs)(l.p,{children:["The amount of information to log when generating scaffold.\nWhen not ",(0,n.jsx)(l.code,{children:"none"}),", the selected level will be the lowest level included."]}),"\n",(0,n.jsxs)(l.p,{children:["For example, level ",(0,n.jsx)(l.code,{children:"info"})," will include ",(0,n.jsx)(l.code,{children:"info"}),", ",(0,n.jsx)(l.code,{children:"warning"})," and ",(0,n.jsx)(l.code,{children:"error"}),", but not ",(0,n.jsx)(l.code,{children:"debug"}),"; and ",(0,n.jsx)(l.code,{children:"warning"})," will only\nshow ",(0,n.jsx)(l.code,{children:"warning"})," and ",(0,n.jsx)(l.code,{children:"error"}),", but not ",(0,n.jsx)(l.code,{children:"info"})," or ",(0,n.jsx)(l.code,{children:"debug"}),"."]}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"Default"})})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.code,{children:"info"})}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-10",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L280",children:"types.ts:280"})}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L308",children:"types.ts:308"})}),"\n",(0,n.jsx)(l.h2,{id:"other",children:"Other"}),"\n",(0,n.jsx)(l.h3,{id:"scaffoldcmdconfig",children:"ScaffoldCmdConfig"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"ScaffoldCmdConfig"}),": ",(0,n.jsx)(l.code,{children:"Object"})]}),"\n",(0,n.jsxs)(l.p,{children:["The Scaffold config for CLI\nContains less and more specific options than ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"}),"."]}),"\n",(0,n.jsxs)(l.p,{children:["For more information about each option, see ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/interfaces/ScaffoldConfig",children:"ScaffoldConfig"}),"."]}),"\n",(0,n.jsx)(l.h4,{id:"type-declaration-2",children:"Type declaration"}),"\n",(0,n.jsxs)(l.table,{children:[(0,n.jsx)(l.thead,{children:(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(l.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(l.tbody,{children:[(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"name"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The name of the scaffold template to use."})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"templates"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:[(0,n.jsx)(l.code,{children:"string"}),"[]"]}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The templates to use for generation"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"output"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The output path to write to"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"subdir"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Whether to create subdir with the input name"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"subdirHelper?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:["Default transformer to apply to subdir name when using ",(0,n.jsx)(l.code,{children:"subdir: true"})]})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"data?"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:[(0,n.jsx)(l.code,{children:"Record"}),"<",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.code,{children:"string"}),">"]}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Add custom data to the templates"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"appendData?"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:[(0,n.jsx)(l.code,{children:"Record"}),"<",(0,n.jsx)(l.code,{children:"string"}),", ",(0,n.jsx)(l.code,{children:"string"}),">"]}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Add custom data to the template in a CLI-friendly syntax (and not JSON)"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"overwrite"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Enable to override output files, even if they already exist"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"quiet"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:["Silence logs, same as ",(0,n.jsx)(l.code,{children:'logLevel: "none"'})]})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"logLevel"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#loglevel-1",children:(0,n.jsx)(l.code,{children:"LogLevel"})})}),(0,n.jsxs)(l.td,{style:{textAlign:"left"},children:["Determine amount of logs to display. ",(0,n.jsx)(l.strong,{children:(0,n.jsx)(l.code,{children:"See"})})," ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#loglevel",children:"LogLevel"})]})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"dryRun"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Don't emit files. This is good for testing your scaffolds and making sure they don't fail, without having to write actual file contents or create directories."})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"config?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Config file path to use"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"key?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The key of the template to use"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"git?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"The git repository to use to fetch the config file"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"version"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"boolean"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Display version"})]}),(0,n.jsxs)(l.tr,{children:[(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"beforeWrite?"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:(0,n.jsx)(l.code,{children:"string"})}),(0,n.jsx)(l.td,{style:{textAlign:"left"},children:"Run a script before writing the files. This can be a command or a path to a file. The file contents will be passed to the given command."})]})]})]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-11",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L346",children:"types.ts:346"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"listcommandclioptions",children:"ListCommandCliOptions"}),"\n",(0,n.jsxs)(l.p,{children:["\u01ac ",(0,n.jsx)(l.strong,{children:"ListCommandCliOptions"}),": ",(0,n.jsx)(l.code,{children:"Pick"}),"<",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffoldcmdconfig",children:(0,n.jsx)(l.code,{children:"ScaffoldCmdConfig"})}),", ",(0,n.jsx)(l.code,{children:'"config"'})," | ",(0,n.jsx)(l.code,{children:'"git"'})," | ",(0,n.jsx)(l.code,{children:'"logLevel"'})," | ",(0,n.jsx)(l.code,{children:'"quiet"'}),">"]}),"\n",(0,n.jsx)(l.h4,{id:"defined-in-12",children:"Defined in"}),"\n",(0,n.jsx)(l.p,{children:(0,n.jsx)(l.a,{href:"https://github.com/chenasraf/simple-scaffold/blob/78d6bf1/src/types.ts#L431",children:"types.ts:431"})}),"\n",(0,n.jsx)(l.hr,{}),"\n",(0,n.jsx)(l.h3,{id:"default",children:"default"}),"\n",(0,n.jsxs)(l.p,{children:["Renames and re-exports ",(0,n.jsx)(l.a,{href:"/simple-scaffold/docs/api/modules#scaffold",children:"Scaffold"})]})]})}function a(e={}){const{wrapper:l}={...(0,d.a)(),...e.components};return l?(0,n.jsx)(l,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},3108:(e,l,s)=>{s.d(l,{Z:()=>r,a:()=>t});var n=s(959);const d={},i=n.createContext(d);function t(e){const l=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(l):{...l,...e}}),[l,e])}function r(e){let l;return l=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),n.createElement(i.Provider,{value:l},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.c853c87f.js b/assets/js/runtime~main.c853c87f.js deleted file mode 100644 index 046e3a5..0000000 --- a/assets/js/runtime~main.c853c87f.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,t,r,a,o,f={},n={};function b(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return f[e].call(r.exports,r,r.exports,b),r.loaded=!0,r.exports}b.m=f,b.c=n,e=[],b.O=(t,r,a,o)=>{if(!r){var f=1/0;for(d=0;d=o)&&Object.keys(b.O).every((e=>b.O[e](r[c])))?r.splice(c--,1):(n=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,a,o]},b.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return b.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);b.r(o);var f={};t=t||[null,r({}),r([]),r(r)];for(var n=2&a&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,b.d(o,f),o},b.d=(e,t)=>{for(var r in t)b.o(t,r)&&!b.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((t,r)=>(b.f[r](e,t),t)),[])),b.u=e=>"assets/js/"+({53:"935f2afb",74:"4c5c6dbb",85:"1f391b9e",92:"5873b104",189:"3bd150b0",237:"1df93b7f",300:"e999734b",306:"f6aebfbf",368:"a94703ab",403:"1e37097f",414:"393be207",518:"a7bd4aaa",597:"5e8c322a",661:"5e95c892",681:"6ff67fd4",879:"6cd1f720",886:"25a6218c",902:"38e469bb",905:"0331ca43",918:"17896441"}[e]||e)+"."+{53:"005b8f98",74:"5eacaab7",85:"d88969bb",92:"6b616f21",189:"1af6634b",237:"6f0634fa",300:"c18bb241",306:"cbd64a46",368:"cd0392f4",403:"e7d6a4c4",414:"d3ec89d6",509:"763f462f",518:"0e60e4e4",597:"0241ad9b",661:"0021d3e5",681:"2dba586c",772:"46e3500d",879:"dde22d01",886:"04847128",902:"e8ad1309",905:"0db3cf5f",918:"e433af4f"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="simple-scaffold-docs:",b.l=(e,t,r,f)=>{if(a[e])a[e].push(t);else{var n,c;if(void 0!==r)for(var i=document.getElementsByTagName("script"),d=0;d{n.onerror=n.onload=null,clearTimeout(u);var o=a[e];if(delete a[e],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach((e=>e(r))),t)return t(r)},u=setTimeout(s.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=s.bind(null,n.onerror),n.onload=s.bind(null,n.onload),c&&document.head.appendChild(n)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/simple-scaffold/",b.gca=function(e){return e={17896441:"918","935f2afb":"53","4c5c6dbb":"74","1f391b9e":"85","5873b104":"92","3bd150b0":"189","1df93b7f":"237",e999734b:"300",f6aebfbf:"306",a94703ab:"368","1e37097f":"403","393be207":"414",a7bd4aaa:"518","5e8c322a":"597","5e95c892":"661","6ff67fd4":"681","6cd1f720":"879","25a6218c":"886","38e469bb":"902","0331ca43":"905"}[e]||e,b.p+b.u(e)},(()=>{var e={303:0,532:0};b.f.j=(t,r)=>{var a=b.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var f=b.p+b.u(t),n=new Error;b.l(f,(r=>{if(b.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),f=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+o+": "+f+")",n.name="ChunkLoadError",n.type=o,n.request=f,a[1](n)}}),"chunk-"+t,t)}},b.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,f=r[0],n=r[1],c=r[2],i=0;if(f.some((t=>0!==e[t]))){for(a in n)b.o(n,a)&&(b.m[a]=n[a]);if(c)var d=c(b)}for(t&&t(r);i{"use strict";var e,t,r,a,o,f={},n={};function c(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return f[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=f,c.c=n,e=[],c.O=(t,r,a,o)=>{if(!r){var f=1/0;for(i=0;i=o)&&Object.keys(c.O).every((e=>c.O[e](r[b])))?r.splice(b--,1):(n=!1,o0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[r,a,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var f={};t=t||[null,r({}),r([]),r(r)];for(var n=2&a&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,c.d(o,f),o},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({53:"935f2afb",74:"4c5c6dbb",85:"1f391b9e",92:"5873b104",189:"3bd150b0",237:"1df93b7f",300:"e999734b",306:"f6aebfbf",368:"a94703ab",403:"1e37097f",414:"393be207",518:"a7bd4aaa",597:"5e8c322a",661:"5e95c892",681:"6ff67fd4",879:"6cd1f720",886:"25a6218c",902:"38e469bb",905:"0331ca43",918:"17896441"}[e]||e)+"."+{53:"005b8f98",74:"5eacaab7",85:"d88969bb",92:"6b616f21",189:"92cbd916",237:"6f0634fa",300:"c18bb241",306:"97187e87",368:"cd0392f4",403:"e7d6a4c4",414:"d3ec89d6",509:"763f462f",518:"0e60e4e4",597:"0241ad9b",661:"0021d3e5",681:"2dba586c",772:"46e3500d",879:"dde22d01",886:"04847128",902:"e8ad1309",905:"0db3cf5f",918:"e433af4f"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="simple-scaffold-docs:",c.l=(e,t,r,f)=>{if(a[e])a[e].push(t);else{var n,b;if(void 0!==r)for(var d=document.getElementsByTagName("script"),i=0;i{n.onerror=n.onload=null,clearTimeout(u);var o=a[e];if(delete a[e],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach((e=>e(r))),t)return t(r)},u=setTimeout(s.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=s.bind(null,n.onerror),n.onload=s.bind(null,n.onload),b&&document.head.appendChild(n)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/simple-scaffold/",c.gca=function(e){return e={17896441:"918","935f2afb":"53","4c5c6dbb":"74","1f391b9e":"85","5873b104":"92","3bd150b0":"189","1df93b7f":"237",e999734b:"300",f6aebfbf:"306",a94703ab:"368","1e37097f":"403","393be207":"414",a7bd4aaa:"518","5e8c322a":"597","5e95c892":"661","6ff67fd4":"681","6cd1f720":"879","25a6218c":"886","38e469bb":"902","0331ca43":"905"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var f=c.p+c.u(t),n=new Error;c.l(f,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),f=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+o+": "+f+")",n.name="ChunkLoadError",n.type=o,n.request=f,a[1](n)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,f=r[0],n=r[1],b=r[2],d=0;if(f.some((t=>0!==e[t]))){for(a in n)c.o(n,a)&&(c.m[a]=n[a]);if(b)var i=b(c)}for(t&&t(r);dsimple-scaffold | Simple Scaffold - + diff --git a/docs/api/interfaces/ScaffoldConfig/index.html b/docs/api/interfaces/ScaffoldConfig/index.html index 7500a17..b89cbb3 100644 --- a/docs/api/interfaces/ScaffoldConfig/index.html +++ b/docs/api/interfaces/ScaffoldConfig/index.html @@ -6,7 +6,7 @@ Interface: ScaffoldConfig | Simple Scaffold - + @@ -27,7 +27,7 @@

Name to be passed to the generated files. {{name}} and {{Name}} inside contents and file names will be replaced accordingly.

Defined in

-

types.ts:19

+

types.ts:19


templates

templates: string[]

@@ -39,7 +39,7 @@ except the README.md file inside.

Default

Current working directory

Defined in

-

types.ts:32

+

types.ts:32


output

output: FileResponse<string>

@@ -51,7 +51,7 @@ except the README.md file inside.

  • FileResponseHandler
  • Defined in

    -

    types.ts:42

    +

    types.ts:42


    subdir

    Optional subdir: boolean

    @@ -61,14 +61,14 @@ the directory name.

    Default

    false

    Defined in

    -

    types.ts:52

    +

    types.ts:52


    data

    Optional data: Record<string, any>

    Add custom data to the templates. By default, only your app name is included as {{name}} and {{Name}}.

    This can be any object that will be usable by Handlebars.

    Defined in

    -

    types.ts:59

    +

    types.ts:59


    overwrite

    Optional overwrite: FileResponse<boolean>

    @@ -84,7 +84,7 @@ a boolean for each file.

    Default

    false

    Defined in

    -

    types.ts:74

    +

    types.ts:74


    logLevel

    Optional logLevel: LogLevel

    @@ -96,7 +96,7 @@ of the same level or higher.

    Default

    2 (info)

    Defined in

    -

    types.ts:86

    +

    types.ts:86


    dryRun

    Optional dryRun: boolean

    @@ -105,7 +105,7 @@ actual file contents or create directories.

    Default

    false

    Defined in

    -

    types.ts:94

    +

    types.ts:94


    helpers

    Optional helpers: Record<string, HelperDelegate>

    @@ -129,7 +129,7 @@ and the value is the helper function itself. The signature of helpers is as foll
  • Templates
  • Defined in

    -

    types.ts:136

    +

    types.ts:136


    subdirHelper

    Optional subdirHelper: string

    @@ -143,7 +143,7 @@ transformation is done.

  • DefaultHelpers
  • Defined in

    -

    types.ts:147

    +

    types.ts:147

    Methods

    beforeWrite

    beforeWrite(content, rawContent, outputPath): undefined | string | Buffer | Promise<undefined | string | Buffer>

    @@ -158,6 +158,6 @@ you may run formatters on a file, fix output in edge-cases not supported by help

    The final output of the file contents-only, after further modifications - or undefined to use the original content (i.e. content.toString())

    Defined in

    -

    types.ts:163

    +

    types.ts:163

    \ No newline at end of file diff --git a/docs/api/modules/index.html b/docs/api/modules/index.html index 12957dc..6d4377d 100644 --- a/docs/api/modules/index.html +++ b/docs/api/modules/index.html @@ -6,7 +6,7 @@ simple-scaffold | Simple Scaffold - + @@ -46,7 +46,7 @@ pre-define the data and use a duplicated key.

  • DateHelpers
  • Defined in

    -

    scaffold.ts:58

    +

    scaffold.ts:58

    Config

    FileResponseHandler

    Ƭ FileResponseHandler<T>: (fullPath: string, basedir: string, basename: string) => T

    @@ -60,7 +60,7 @@ pre-define the data and use a duplicated key.

    Returns

    T

    Defined in

    -

    types.ts:322

    +

    types.ts:322


    FileResponse

    Ƭ FileResponse<T>: T | FileResponseHandler<T>

    @@ -77,7 +77,7 @@ Can either be:

    Type parameters

    Name
    T

    Defined in

    -

    types.ts:338

    +

    types.ts:338


    ScaffoldConfigMap

    Ƭ ScaffoldConfigMap: Record<string, ScaffoldConfig>

    @@ -88,7 +88,7 @@ Can either be:

    See

    ScaffoldConfig

    Defined in

    -

    types.ts:400

    +

    types.ts:400


    ScaffoldConfigFile

    Ƭ ScaffoldConfigFile: AsyncResolver<ScaffoldCmdConfig, ScaffoldConfigMap>

    @@ -100,7 +100,7 @@ Can either be:

  • A function that returns a promise that resolves to a ScaffoldConfigMap object
  • Defined in

    -

    types.ts:411

    +

    types.ts:411

    Helpers

    CaseHelpers

    Ƭ CaseHelpers: "camelCase" | "hyphenCase" | "kebabCase" | "lowerCase" | "pascalCase" | "snakeCase" | "startCase" | "upperCase"

    @@ -115,7 +115,7 @@ Can either be:

  • ScaffoldConfig.subdirHelper
  • Defined in

    -

    types.ts:197

    +

    types.ts:197


    DateHelpers

    Ƭ DateHelpers: "date" | "now"

    @@ -144,7 +144,7 @@ the current date.

  • ScaffoldConfig
  • Defined in

    -

    types.ts:244

    +

    types.ts:244


    DefaultHelpers

    Ƭ DefaultHelpers: CaseHelpers | DateHelpers

    @@ -159,13 +159,13 @@ replace My Name with my_name when producing the final
  • ScaffoldConfig
  • Defined in

    -

    types.ts:259

    +

    types.ts:259


    Helper

    Ƭ Helper: HelperDelegate

    Helper function, see https://handlebarsjs.com/guide/#custom-helpers

    Defined in

    -

    types.ts:266

    +

    types.ts:266

    Logging (const)

    LogLevel

    Const LogLevel: Object

    @@ -178,8 +178,8 @@ show warning and error, but not info or <

    Type declaration

    NameTypeDescription
    none"none"Silent output
    debug"debug"Debugging information. Very verbose and only recommended for troubleshooting.
    info"info"The regular level of logging. Major actions are logged to show the scaffold progress. Default ts
    warning"warning"Warnings such as when file fails to replace token values properly in template.
    error"error"Errors, such as missing files, bad replacement token syntax, or un-writable directories.

    Defined in

    -

    types.ts:280

    -

    types.ts:308

    +

    types.ts:280

    +

    types.ts:308

    Logging (type)

    LogLevel

    Ƭ LogLevel: typeof LogLevel[keyof typeof LogLevel]

    @@ -190,8 +190,8 @@ show warning and error, but not info or <

    Default

    info

    Defined in

    -

    types.ts:280

    -

    types.ts:308

    +

    types.ts:280

    +

    types.ts:308

    Other

    ScaffoldCmdConfig

    Ƭ ScaffoldCmdConfig: Object

    @@ -201,12 +201,12 @@ Contains less and more specific options than Type declaration
    NameTypeDescription
    namestringThe name of the scaffold template to use.
    templatesstring[]The templates to use for generation
    outputstringThe output path to write to
    subdirbooleanWhether to create subdir with the input name
    subdirHelper?stringDefault transformer to apply to subdir name when using subdir: true
    data?Record<string, string>Add custom data to the templates
    appendData?Record<string, string>Add custom data to the template in a CLI-friendly syntax (and not JSON)
    overwritebooleanEnable to override output files, even if they already exist
    quietbooleanSilence logs, same as logLevel: "none"
    logLevelLogLevelDetermine amount of logs to display. See LogLevel
    dryRunbooleanDon't emit files. This is good for testing your scaffolds and making sure they don't fail, without having to write actual file contents or create directories.
    config?stringConfig file path to use
    key?stringThe key of the template to use
    git?stringThe git repository to use to fetch the config file
    versionbooleanDisplay version
    beforeWrite?stringRun a script before writing the files. This can be a command or a path to a file. The file contents will be passed to the given command.

    Defined in

    -

    types.ts:346

    +

    types.ts:346


    ListCommandCliOptions

    Ƭ ListCommandCliOptions: Pick<ScaffoldCmdConfig, "config" | "git" | "logLevel" | "quiet">

    Defined in

    -

    types.ts:431

    +

    types.ts:431


    default

    Renames and re-exports Scaffold

    diff --git a/docs/usage/cli/index.html b/docs/usage/cli/index.html index 26cd039..6b0f1ff 100644 --- a/docs/usage/cli/index.html +++ b/docs/usage/cli/index.html @@ -6,7 +6,7 @@ CLI Usage | Simple Scaffold - + diff --git a/docs/usage/configuration_files/index.html b/docs/usage/configuration_files/index.html index 7e5db22..93e69cc 100644 --- a/docs/usage/configuration_files/index.html +++ b/docs/usage/configuration_files/index.html @@ -6,7 +6,7 @@ Configuration Files | Simple Scaffold - + diff --git a/docs/usage/examples/index.html b/docs/usage/examples/index.html index 93df5d0..80ce8a5 100644 --- a/docs/usage/examples/index.html +++ b/docs/usage/examples/index.html @@ -6,7 +6,7 @@ Examples | Simple Scaffold - + diff --git a/docs/usage/index.html b/docs/usage/index.html index 8a33a53..e35fc80 100644 --- a/docs/usage/index.html +++ b/docs/usage/index.html @@ -6,7 +6,7 @@ Usage | Simple Scaffold - + diff --git a/docs/usage/migration/index.html b/docs/usage/migration/index.html index 9536b8f..c98e9d3 100644 --- a/docs/usage/migration/index.html +++ b/docs/usage/migration/index.html @@ -6,7 +6,7 @@ Migration | Simple Scaffold - + diff --git a/docs/usage/node/index.html b/docs/usage/node/index.html index 718f931..3305f82 100644 --- a/docs/usage/node/index.html +++ b/docs/usage/node/index.html @@ -6,7 +6,7 @@ Node.js Usage | Simple Scaffold - + diff --git a/docs/usage/templates/index.html b/docs/usage/templates/index.html index 2332b68..57440f1 100644 --- a/docs/usage/templates/index.html +++ b/docs/usage/templates/index.html @@ -6,7 +6,7 @@ Template Files | Simple Scaffold - + diff --git a/index.html b/index.html index d9ab4b2..f1077a7 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Simple Scaffold | Simple Scaffold - + diff --git a/markdown-page/index.html b/markdown-page/index.html index 0c0c699..29c652a 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -6,7 +6,7 @@ Markdown page example | Simple Scaffold - +