Load either installed or bundled version of plugin depending on which is newer

Summary: Load either installed or bundled version of plugin depending on which is newer.

Reviewed By: mweststrate

Differential Revision: D21858965

fbshipit-source-id: aa46eafe0b5137134fadad827749672441f2c9e5
This commit is contained in:
Anton Nikolaev
2020-06-03 07:37:11 -07:00
committed by Facebook GitHub Bot
parent e31ddbc648
commit e65b355fb6
8 changed files with 76 additions and 27 deletions

View File

@@ -12,13 +12,12 @@ import fs from 'fs-extra';
import expandTilde from 'expand-tilde';
import {homedir} from 'os';
export default async function getPluginFolders(
includeThirdparty: boolean = false,
) {
export function getPluginsInstallationFolder(): string {
return path.join(homedir(), '.flipper', 'thirdparty');
}
export async function getPluginSourceFolders(): Promise<string[]> {
const pluginFolders: string[] = [];
if (includeThirdparty) {
pluginFolders.push(path.join(homedir(), '.flipper', 'thirdparty'));
}
if (process.env.FLIPPER_NO_EMBEDDED_PLUGINS === 'true') {
console.log(
'🥫 Skipping embedded plugins because "--no-embedded-plugins" flag provided',