Home Manual Reference Source
import {TargetsFinder} from 'projext/src/services/targets/targetsFinder.js'
public class | source

TargetsFinder

This is used to find targets information on an specific directory. It not only reads the directory tree but also tries to identify the targets types by analyzing the contents of indentified targets entry files.

Member Summary

Public Members
public

The contents of the project package.json.

public

A local reference for the pathUtils service.

Private Members
private

A dictionary of known frameworks that can be used on Node, and regular expressions that match their module name.

Method Summary

Public Methods
public

find(directory: string): Array

Given a directory path relative to the project root, this method will try to identify targets and their properties.

Public Members

public packageInfo: Object source

The contents of the project package.json. If there's only one target and is not on a sub folder, the way the service names it is by using the project name.

public pathUtils: PathUtils source

A local reference for the pathUtils service.

Private Members

private _nodeFrameworks: Object source

A dictionary of known frameworks that can be used on Node, and regular expressions that match their module name.

Public Methods

public find(directory: string): Array source

Given a directory path relative to the project root, this method will try to identify targets and their properties.

Params:

NameTypeAttributeDescription
directory string

A directory path relative to the project root.

Return:

Array

Each item will be a TargetsFinderTarget.