mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 18:06:15 -04:00
Feat/local install (#6232)
* Added local install * Fixed installing plugin. * Added output for other use case. * Fixed installation.
This commit is contained in:
parent
e63d9aef1b
commit
324ac44ad3
2 changed files with 18 additions and 2 deletions
|
@ -10,7 +10,17 @@ if (process.argv.length === 2) {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
const plugins = process.argv.slice(2);
|
||||
let plugins = process.argv.slice(2)
|
||||
let installFromPath = false;
|
||||
|
||||
const thirdOptPlug = plugins[0]
|
||||
|
||||
console.log("Third option: ", thirdOptPlug)
|
||||
if (thirdOptPlug && thirdOptPlug.includes('path')) {
|
||||
installFromPath = true
|
||||
plugins.splice(plugins.indexOf('--path'), 1);
|
||||
}
|
||||
|
||||
|
||||
const persistInstalledPlugins = async () => {
|
||||
const plugins:PackageData[] = []
|
||||
|
@ -27,6 +37,12 @@ const persistInstalledPlugins = async () => {
|
|||
|
||||
async function run() {
|
||||
for (const plugin of plugins) {
|
||||
if(installFromPath) {
|
||||
console.log(`Installing plugin from path: ${plugin}`);
|
||||
await linkInstaller.installFromPath(plugin);
|
||||
continue;
|
||||
}
|
||||
console.log(`Installing plugin from registry: ${plugin}`)
|
||||
await linkInstaller.installPlugin(plugin);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue