Home Reference Source Repository
public class | source

Importer

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

dirload(path: string, callback: function, attach: object): *

requires every js file inside the given folder, fires callback with 2 arguments, error and the object where the required objects are attached

public

dirloadSync(path: string, attach: object): object

Requires every js file inside the given folder, return object where the required objects are attached

public

load(modules: array, attach: object): object

requires every module in the given array, returns an object where the required objects are attached

Public Constructors

public constructor source

Public Methods

public dirload(path: string, callback: function, attach: object): * source

requires every js file inside the given folder, fires callback with 2 arguments, error and the object where the required objects are attached

Params:

NameTypeAttributeDescription
path string

folder path

callback function

receives 2 arguments, error and object

attach object

where the required files should be attached

Return:

*

undefined

public dirloadSync(path: string, attach: object): object source

Requires every js file inside the given folder, return object where the required objects are attached

Params:

NameTypeAttributeDescription
path string

folder path

attach object

where the required files should be attached

Return:

object

public load(modules: array, attach: object): object source

requires every module in the given array, returns an object where the required objects are attached

Params:

NameTypeAttributeDescription
modules array

module paths

attach object

where the required files should be attached

Return:

object

required modules