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

pluginDependencies in plugin bower files should work #1858

Closed
canstudios-nicolaw opened this issue Feb 1, 2018 · 4 comments
Closed

pluginDependencies in plugin bower files should work #1858

canstudios-nicolaw opened this issue Feb 1, 2018 · 4 comments
Assignees
Labels
S: merged Completed, reviewed, and merged issues T: bug

Comments

@canstudios-nicolaw
Copy link
Contributor

canstudios-nicolaw commented Feb 1, 2018

Affected Area

It should be possible to add a pluginDependencies object to the bower.json of any plugin and have the plugins listed in it pulled into the build. Eg. The hotgraphic component should be able to ensure the narrative component gets included by listing it in its pluginDependencies.

Requested Feature

At the moment the pluginDependencies are ignored by the authoring tool. Instead in the outputmanager.js file there is a hardcoded hack which adds the narrative component if the hotgraphic is present, and adds the mcq if the gmcq component is present.

Use Case

New plugins with dependencies can be developed.

Additional Information

The hack was added in these PRs:
#1033
#1038

@canstudios-nicolaw canstudios-nicolaw added this to the 0.5.0 milestone Feb 1, 2018
@canstudios-nicolaw canstudios-nicolaw self-assigned this Feb 1, 2018
@tomgreenfield
Copy link
Contributor

Related: #1179 (comment).

@canstudios-nicolaw
Copy link
Contributor Author

I'm aware this could be a temporary/partial solution, but it feels better than leaving the hack in place. I think it could be a while before any changes are made which would make this completely irrelevant. And in the meantime this would fix pluginDependencies for everyone.

I'm not proposing a big change, we are just testing the changes at Can but we have replaced the hack with some code that looks into the bower.json files of included plugins and adds their pluginDependencies to the list of included plugins.

If anyone has any thoughts please let me know.

Thanks

@taylortom
Copy link
Member

taylortom commented Feb 1, 2018

Agree that it’s not ideal.

We haven’t done anything on this before as we’ve never really had a solid solution for framework dependencies. @oliverfoster is looking at this in the near future, so may have recommendations?

@oliverfoster
Copy link
Member

oliverfoster commented Feb 5, 2018

v4 of Adapt Framework should provide a solid solution for this, by using bower properly. then we can revert from pluginDependencies to dependencies in the bower.json
After that we'll want to drop bower and move over to package.json and npm etc...

@taylortom taylortom added the S: awaiting-review Completed issues waiting on reviews label Mar 5, 2018
@canstudios-louisem canstudios-louisem added S: merged Completed, reviewed, and merged issues T: bug and removed S: awaiting-review Completed issues waiting on reviews labels May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: merged Completed, reviewed, and merged issues T: bug
Projects
None yet
Development

No branches or pull requests

5 participants