Changing/Developing H5P-Editor libraries



I am currently trying to create a new editor widget but am becoming a little frustrated by 
continuously having to follow the same procedure for a single "debug" (incrementing the editor widgets version, the main libraries version, change the library folder names accordingly, pack and upload the .h5p file...).

I know how I can create a local developing environment with node.js when working with runnable libraries,
but is there anything similar or some other advice on how to make the development of editor libraries more efficient?

Thank you for any advice!

Content types: 
otacke's picture

Hi meisenberg!

What system are you working on?

We recommend to use Drupal7 and to activate the development mode and the development library. Next to the libraries folder, you will then find a development folder where you can put your work-in-progress. H5P will use libraries from that folder instead of the library folder, and you will not have to update version numbers, etc.

It's not recommended, but you could also use WordPress. You should set

define('H5P_DEV', true);

in your wp.config file, to disable the checking of version numbers when uploading libraries. Don't do this in production!. Alternatively/additionally, you could also perform "open heart surgery" and develop within the libraries folder directly and flush the cachedassets folder when your changes are done. That will remove the cached javascript/css files and re-create them.