Home Manual Reference Source
public class | source

BuildEngines

This is an special service as it doesn't do anything but returning another services: Build engines are what projext uses to bundle targets, since they depend on a target configuration, we can't have huge if that checks the value of the setting in order to retrieve the required service. The solution we came up with is that the engines services all respect an interface and register themselves with the name [name]BuildEngine so the rest of the app can use this service to retrieve them by name.

Constructor Summary

Public Constructor
public

Class constructor.

Member Summary

Public Members
public

A local reference for the main app container.

Method Summary

Public Methods
public

Get a build engine service.

Public Constructors

public constructor(app: Projext) source

Class constructor.

Params:

NameTypeAttributeDescription
app Projext

The main app container. Used to retrieve the build engines services.

Public Members

public app: Projext source

A local reference for the main app container.

Public Methods

public getEngine(name: string): BuildEngine source

Get a build engine service.

Params:

NameTypeAttributeDescription
name string

The engine name.

Return:

BuildEngine

Throw:

Error

If the service is not registered.