0.3.5 • Published 5 years ago
musicstream-installer v0.3.5
Installer and updater for MusicStream
Functions
Before you can use any of the functions listed below you need to run the package as a function.
const msi = require('musicstream-installer');
msi.downloadMusicstream(directory, updateEvent, doneEvent, errorEvent);
Most functions have four arguments directory
, updateEvent
, doneEvent
, errorEvent
.
directory
(string): The directory in which the program installs/updatesupdateEvent
/doneEvent
/errorEvent
(functions): Functions which will be called when updates/done/erroroptions
(object): Optional argument. Only for 'downloadMusicstream' and 'updateMusicstream'. You can specify 'latestCommit' which, instead of the latest release, downloads the latest commit from GitHub and noNPMInstall which does not perform an NPM install after updating or installing.
The available functions are:
downloadNode
: Downloads latest (if available) NodeJS executable into the specified directorydownloadMusicstream
: Downloads latest version of MusicStream from GitHub into the specified directory (created a new folder)updateMusicstream
: Updates the installed version of MusicStreaminstallPlugin
: Installs a plugin. Requires:directory
,url
,updateEvent
andask
(defaults totrue
).\Directory
is the MusicStream directory.\url
is the plugin GitHub url.\updateEvent
is the same as above. This function returns aPromise
instead of usingdoneEvent
anderrorEvent
. The resolve function of the Promise returns the plugin path.\ask
is a boolean value configuring if it should ask the user if they want to install specific plugins.