@absolunet/ioc2.1.0

View on GitHub

JavaScriptDriver

JavaScript driver that allows .js file interpretation on load. However, it writes in plain text.

Extends

Members

(static) dependencies :Array.<string>

Source:
Class dependencies: ['app', 'file.engine'].

Methods

load(file)

Source:
Overrides:
Load the given file.
Parameters:
Name Type Description
file string The file path.
Returns:
The file content.
Type
*

loadAsync(file)

Source:
Overrides:
Asynchronously load the given file.
Parameters:
Name Type Description
file string The file path.
Returns:
The file content.
Type
Promise.<*>

write(file, content, optionsopt)

Source:
Inherited From:
Write file in the given destination.
Parameters:
Name Type Attributes Description
file string The file path.
content string | Stream The content to put in the file.
options * <optional>
The options to send to the write process.
Returns:
Indicates that the process was successful.
Type
boolean

writeAsync(file, content, optionsopt)

Source:
Inherited From:
Asynchronously write file in the given directory.
Parameters:
Name Type Attributes Description
file string The file path.
content string | Stream The content to put in the file.
options * <optional>
The options to send to the write process.
Returns:
Indicates that the process was successful.
Type
Promise.<boolean>