Namespace: use

BX. use

File loading.
Requires BX.jsxinc and modules/fs/FileLoader.jsxinc.
Defines 'brixy' as alias to the core Brixy folder (i.e. parent folder of this file).

Source:

Methods

(static) alias (aliasopt, path)

Creates the alias of the Folder path.

Parameters:
Name Type Attributes Default Description
alias string <optional>
''

Folder shortcut. (optional)

path string

Folder path relative to the active script.

Throws:
  • Exception if folder doesn't exist.

  • Exception if alias already exists for a different path.

Source:

(static) aliasPath (alias)

Returns full path of the alias.

Parameters:
Name Type Description
alias string
Throws:
  • Exception if alias doesn't exist.

Source:

(static) ignore (aliasopt, path)

Stores path to the included list to prevent the further loading. Does't test if file exists.

Parameters:
Name Type Attributes Default Description
alias string <optional>
''

Folder shortcut. (optional)

path string

File or folder path.

Throws:
  • Exception if alias doesn't exist.

Source:

(static) use (aliasopt, path)

Includes jsx|jsxinc|js|jsxbin file. Folders are traversed recursively. Each file is included only once.
There is available method BX.use() as a shortcut to BX.use.use().

Parameters:
Name Type Attributes Default Description
alias string <optional>
''

Folder shortcut. (optional)

path string

File or folder path.

Throws:
  • Exception if alias or file doesn't exist.

Source: