Treat only packages with "flipper-plugin" keyword as Flipper plugins
Summary: Treat only packages with "flipper-plugin" keyword as Flipper plugins. This will allow to place lib packages re-used by different plugins into "plugins" folder. Changelog: Internals: it is now possible to add modules for re-use by different plugins into `desktop/plugins` folder. Reviewed By: mweststrate Differential Revision: D20898133 fbshipit-source-id: 8934870350ce42af3dc8060d1494025519ed307e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
452c52c291
commit
61a889a385
@@ -210,7 +210,10 @@ function entryPointForPluginFolder(pluginPath: string) {
|
||||
if (packageJSON) {
|
||||
try {
|
||||
const json = JSON.parse(packageJSON);
|
||||
if (json.workspaces) {
|
||||
if (!json.keywords || !json.keywords.includes('flipper-plugin')) {
|
||||
console.log(
|
||||
`Skipping package "${json.name}", because its "keywords" field does not contain tag "flipper-plugin"`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
const pkg = json as PluginManifest;
|
||||
|
||||
Reference in New Issue
Block a user