API Reference

Scaffold Class

Defined in lib/core/scaffold.js:36
Extends Box

Description

This module manages all files in the scaffold folder.

Constructor

Scaffold

This module manages all files in the scaffold folder.

Methods

_dispatch

(type, path, [callback]) async private
Inherited from : lib/box/index.js:102

Dispatches files to processors.

Parameters

  • type String

    Available types: create, update, delete

  • path String

    File path

  • callback Function optional

_loadFileList

(callback) async private
Inherited from : lib/box/index.js:175

Loads file list and checks their modified date.

Parameters

addProcessor

(pattern, fn)
Inherited from : lib/box/index.js:86

Adds a processor to the box.

Parameters

get

(layout, callback) async

Gets a scaffold.

Parameters

process

([files], [callback]) async
Inherited from : lib/box/index.js:266

Loads all files and runs processors.

Parameters

remove

(layout, [callback]) async

Removes a scaffold.

Parameters

set

(layout, content, [callback]) async

Creates/updates a scaffold.

Parameters

unwatch

Inherited from : lib/box/index.js:396

Stops watching.

watch

Inherited from : lib/box/index.js:347

Starts watching.

Properties

Box.File

static
Inherited from : lib/box/index.js:408

See Box.File

Box.Pattern

static
Inherited from : lib/box/index.js:417

See Box.Pattern

asset_dir

Asset folder.

base

Inherited from : lib/box/index.js:31

Base path.

defaults

The default scaffold collection.

isProcessing

private
Inherited from : lib/box/index.js:64

Indicates if the box is processing.

options

Inherited from : lib/box/index.js:73

processingFiles

private
Inherited from : lib/box/index.js:47

Processing files.

processors

Inherited from : lib/box/index.js:39

Processor collection.

scaffolds

The scaffold collection.

watcher

Inherited from : lib/box/index.js:56

A instance of watcher.