Home Manual Reference Source Test Repository
import Reptar from 'reptar/lib/index.js'
public class | source

Reptar

Static Method Summary

Static Public Methods
public static

Get information about the Reptar installation from its package.json.

Constructor Summary

Public Constructor
public

constructor(options: Object)

Create a new Reptar instance.

Member Summary

Public Members
public

Expose config object on instance.

public

Our destination object of where our files will be written.

public

Create backing FileSystem instance.

public

Create metadata that will be accessible within every template.

public

Save options passed into instance.

public

Method Summary

Public Methods
public

async build()

Builds the Reptar site in its entirety.

public

Removes configured destination directory and all files contained.

public

async update(objectPattern: {"skipFiles": *})

Static Public Methods

public static getReptarData(): Object source

Get information about the Reptar installation from its package.json.

Return:

Object

Public Constructors

public constructor(options: Object) source

Create a new Reptar instance.

Params:

NameTypeAttributeDescription
options Object

Options object.

options.rootPath string

Where the root path of this Reptar instance points to.

options.incremental boolean

If we should incremental build files.

options.noTemplateCache boolean

Should templates be cached. Typically this is only off when developing or in watch mode.

Public Members

public config: Config source

Expose config object on instance.

public destination: Object<string, File> source

Our destination object of where our files will be written.

public fileSystem: FileSystem source

Create backing FileSystem instance.

public metadata: Metadata source

Create metadata that will be accessible within every template.

public options: Object source

Save options passed into instance.

public renderer: Renderer source

Public Methods

public async build() source

Builds the Reptar site in its entirety.

public cleanDestination(): Promise source

Removes configured destination directory and all files contained.

Return:

Promise

Promise object.

public async update(objectPattern: {"skipFiles": *}) source

Params:

NameTypeAttributeDescription
objectPattern {"skipFiles": *}
  • optional
  • default: {}