Home Manual Reference Source
import {BuildNodeWatcher} from 'projext/src/services/building/buildNodeWatcher.js'
public class | source

BuildNodeWatcher

This service provides a simple interface for watching targets using watchpack. The actual service that does the 'watching' is buildNodeWatcherProcess, but this one takes care of reading and processing a target settings before telling the other service to start watching.

Constructor Summary

Public Constructor
public

constructor(buildNodeWatcherProcess: BuildNodeWatcherProcess#run, targets: Targets)

Member Summary

Public Members
public

buildNodeWatcherProcess: BuildNodeWatcherProcess#run

A local reference for the buildNodeWatcherProcess service.

public

A local reference for the targets service.

Method Summary

Public Methods
public

Watch a target.

Public Constructors

public constructor(buildNodeWatcherProcess: BuildNodeWatcherProcess#run, targets: Targets) source

Params:

NameTypeAttributeDescription
buildNodeWatcherProcess BuildNodeWatcherProcess#run

To actually watch a target files.

targets Targets

To get the information of the included targets.

Public Members

public buildNodeWatcherProcess: BuildNodeWatcherProcess#run source

A local reference for the buildNodeWatcherProcess service.

public targets: Targets source

A local reference for the targets service.

Public Methods

public watchTarget(target: Target): Watchpack source

Watch a target.

Params:

NameTypeAttributeDescription
target Target

The target information.

Return:

Watchpack

Throw:

Error

If the target needs to be bundled.

Error

If one of the included targets requires bundling.