Class: Template
Defined in: ../../skaff-lib/src/core/templates/Template.ts:52
Constructors
Constructor
new Template(
init
):Template
Defined in: ../../skaff-lib/src/core/templates/Template.ts:76
Parameters
init
TemplateInit
Returns
Template
Properties
absoluteBaseDir
absoluteBaseDir:
string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:59
absoluteDir
absoluteDir:
string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:60
absolutePartialsDir?
optional
absolutePartialsDir:string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:66
absoluteTemplatesDir
absoluteTemplatesDir:
string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:63
branch?
optional
branch:string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:73
commitHash?
optional
commitHash:string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:71
config
config:
GenericTemplateConfigModule
Defined in: ../../skaff-lib/src/core/templates/Template.ts:53
foundPartials?
optional
foundPartials:Record
<string
,string
>
Defined in: ../../skaff-lib/src/core/templates/Template.ts:57
isLocal
isLocal:
boolean
=false
Defined in: ../../skaff-lib/src/core/templates/Template.ts:72
parentTemplate?
optional
parentTemplate:Template
Defined in: ../../skaff-lib/src/core/templates/Template.ts:55
relativeDir
relativeDir:
string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:61
relativePartialsDir?
optional
relativePartialsDir:string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:67
relativeRefDir?
optional
relativeRefDir:string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:69
relativeTemplatesDir
relativeTemplatesDir:
string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:64
repoUrl?
optional
repoUrl:string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:74
subTemplates
subTemplates:
Record
<string
,Template
[]> ={}
Defined in: ../../skaff-lib/src/core/templates/Template.ts:54
Methods
findAllPartials()
findAllPartials():
Promise
<Result
<Record
<string
,string
>>>
Defined in: ../../skaff-lib/src/core/templates/Template.ts:248
Returns
Promise
<Result
<Record
<string
, string
>>>
findCommitHash()
findCommitHash():
string
Defined in: ../../skaff-lib/src/core/templates/Template.ts:238
Returns
string
findRootTemplate()
findRootTemplate():
Template
Defined in: ../../skaff-lib/src/core/templates/Template.ts:231
Returns
Template
findSubTemplate()
findSubTemplate(
templateName
):null
|Template
Defined in: ../../skaff-lib/src/core/templates/Template.ts:213
Parameters
templateName
string
Returns
null
| Template
instantiateNewProject()
instantiateNewProject(
rootTemplateSettings
,destinationDir
,projectName
,projectCreationOptions?
,templateGeneratorService?
):Promise
<Result
<ProjectCreationResult
>>
Defined in: ../../skaff-lib/src/core/templates/Template.ts:140
Parameters
rootTemplateSettings
UserTemplateSettings
destinationDir
string
projectName
string
projectCreationOptions?
templateGeneratorService?
TemplateGeneratorService
Returns
Promise
<Result
<ProjectCreationResult
>>
isValid()
isValid():
Promise
<boolean
>
Defined in: ../../skaff-lib/src/core/templates/Template.ts:291
Returns
Promise
<boolean
>
mapToDTO()
mapToDTO():
TemplateDTO
Defined in: ../../skaff-lib/src/core/templates/Template.ts:183
Returns
templateInExistingProject()
templateInExistingProject(
userSettings
,destinationProject
,parentInstanceId
):Promise
<Result
<string
>>
Defined in: ../../skaff-lib/src/core/templates/Template.ts:105
Parameters
userSettings
UserTemplateSettings
destinationProject
parentInstanceId
string
Returns
Promise
<Result
<string
>>