Gushio utilities
Gushio provides one additional global object gushio
containing utilities and information about Gushio itself.
Running version
gushio.version
returns the version of Gushio running the script. The version is wrapped as a
SemVer object.
Import libraries
gushio.import()
allows to import external libraries in your script. For more information see
Dependencies.
Run other scripts
With gushio.run()
you can execute another gushio script. The target script runs in the same process of the "parent"
script and inherits its Gushio settings (folder, verbose mode, ...).
module.exports = {
run: async () => {
await gushio.run('somePath/simpleScript.js')
// the following notations are the same
await gushio.run('somePath/myOtherScript.js', 'arg1 arg2 --flag "flag value 1" --other-flag')
await gushio.run('somePath/myOtherScript.js', ['arg1', 'arg2', '--flag', 'flag value 1', '--other-flag'])
}
}