From Github to .h5p
Submitted by [email protected] on Fri, 04/05/2019 - 13:02
Forums:
Hi I've tried to clone a content type to a local folder and run the following commands
npm install
npm run build
h5p pack -r contentFolder myFile.h5p
This creates a small myFile.h5p that does not include the dependencies and there are no H5P folders inside. It would be fantastic if someone could point me in the right direction on how to go about this...
Thanks a bunch! Jorgen
[email protected]
Tue, 04/09/2019 - 12:22
Permalink
Are there some directions on
Are there some directions on this that I'm missing or is this something that anyone would like to share?
Seems to me many basic modifications unfortunately only can be done through changing the content type itself and therefore it would be great if the latest versions of .h5ps were more readily accessible or at least possible to recreate easily.
otacke
Tue, 04/09/2019 - 16:33
Permalink
Hi!The H5P dependencies
Hi!
The H5P dependencies cannot be included in the package if you have not cloned (and built) the appropriate repositories. They're not node packages or something similar. If they are already installed on the host system (like common libraries such as H5P.Question), it's not even necessary to put them into the package.
In my experience, the hooks that H5P offers (please cmp. https://h5p.org/node/2692) can be used to change the behavior and the visual look quite a lot.
The build chain that H5P uses for more and more libraries is really nothing special or uncommon and quite sensible to have from a developer's point of view. I understand that these may seem to be quite an obstacle if you're not a coder, but you can't please everyone I guess.
Cheers,
Oliver
BV52
Wed, 04/10/2019 - 03:56
Permalink
Thank you Oliver.@Jorgen I'm
Thank you Oliver.
@Jorgen I'm no developer myself but knows a bit about coding. I am using the development environment in Drupal as outlined in this documentation. Personally I do this a bit differently I would git clone the main library of the content from github (E.g. Course Presentation). Once downloaded I should be able to "create" a content but it will blank since I don't have all the dependencies. I will get an error message (screenshot attached) and build the libraries from there. Please note that some dependencies are located somewhere else an example would be Oliver's repository which includes some of the content types he developed.
-BV52
[email protected]
Wed, 04/10/2019 - 09:50
Permalink
Hi Oliver and BV52 and thank
Hi Oliver and BV52 and thank you for that!
I'm pretty sure I understand how to proceed now so will try not to bug you for a while :D J