Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advice on referencing local plugins & their paths #191

Closed
taylortom opened this issue Jul 19, 2023 · 1 comment
Closed

Advice on referencing local plugins & their paths #191

taylortom opened this issue Jul 19, 2023 · 1 comment
Assignees
Labels

Comments

@taylortom
Copy link
Member

taylortom commented Jul 19, 2023

Context: I'm adding the update API, and need to be able to copy locally installed plugins to and from a temp location during the update


Issue 1

UPDATE: I'm able to reference local plugins using Project.getInstallTargets, let me know if this is not the way

I'm having trouble retrieving a list of locally installed plugins (i.e. those not managed by bower). It looks like I should be able to do this using a combination of Project and Plugin, i.e. something like:

const project = new Project({ cwd })
const localPlugins = (await project.getInstalledPlugins()).filter(p => p.isLocalSource)

However, I'm currently not getting any useful values back from isLocalSource, isLocalSourceZip & sourcePath, so I'm left having to figure this all out manually.


Issue 2

My adapt.json looks a bit strange, with an unexpected(?) mixture of paths & versions. See excerpt below:

{
  // all bower managed plugins look like this (as expected)
  "adapt-contrib-vanilla": "*",
  // some local plugins have a version
  "adapt-search": "3.0.0", 
  // other local plugins have a path (the original upload path which doesn't exist)
  "adapt-youtube": "FRAMEWORK_IMPORT_PATH/src/components/adapt-youtube",
  "adapt-videoBackground": "PLUGIN_UPLOAD_PATH"
}

I would expect the value for local plugins to be their current dir (in the current situation the paths reference a temp upload dir which no longer exists) - this may be a misunderstanding on my part (I perhaps need to move the uploaded files to somewhere more permanent prior to handing off the rest of the installation to the CLI?)

@taylortom taylortom self-assigned this Jul 19, 2023
@taylortom
Copy link
Member Author

Has been discussed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant