0.3.5 • Published 6 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,updateEventandask(defaults totrue).\Directoryis the MusicStream directory.\urlis the plugin GitHub url.\updateEventis the same as above. This function returns aPromiseinstead of usingdoneEventanderrorEvent. The resolve function of the Promise returns the plugin path.\askis a boolean value configuring if it should ask the user if they want to install specific plugins.