API Reference

Source Class

Defined in lib/core/source.js:7
Extends Box

Description

This module manages all files in the source folder.

Constructor

Source

This module manages all files in the source 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

process

([files], [callback])
Inherited from Box but overwritten in: lib/core/source.js:24

Loads all files and runs processors.

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

base

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

Base path.

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.

watcher

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

A instance of watcher.