Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Template

Interface defining a template that can be generated using the TemplateDirective.

Hierarchy

  • Template

Index

Properties

baseAppPath

baseAppPath: string[]

Array of path-strings that are resolved relative to the base app directory.

example

['http', 'controllers']

example

['units']

description

description: string

Brief description of the template displayed on the --help page for the TemplateDirective. Should be brief (1 sentence).

fileSuffix

fileSuffix: string

The suffix of the file generated by this template.

example

.mytemplate.ts

example

.controller.ts

name

name: string

The name of the template as it will be specified from the command line.

example

If this is 'mytemplate', then the template will be created with:

./ex new mytemplate some:path

render

render: (name: string, fullCanonicalName: string, targetFilePath: UniversalPath) => string | Promise<string>

Render the given template to a string which will be written to the file. Note: this method should NOT write the contents to targetFilePath.

example

If the user enters:

./ex new mytemplate path:to:NewInstance

Then, the following params are:

{
    name: 'NewInstance',
    fullCanonicalPath: 'path:to:NewInstance',
    targetFilePath: UniversalPath { }
}
param

the singular name of the resource

param

the full canonical name of the resource

param

the UniversalPath where the file will be written

Type declaration

    • (name: string, fullCanonicalName: string, targetFilePath: UniversalPath): string | Promise<string>
    • Parameters

      • name: string
      • fullCanonicalName: string
      • targetFilePath: UniversalPath

      Returns string | Promise<string>

Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.