Separate files for template code?
Submitted by nnyby on Mon, 12/21/2015 - 21:37
Forums:
Hi,
I was looking at the h5p javascript libraries, and noticed some EJS markup in the JavaScript code. For example:
https://github.com/h5p/h5p-question-set/blob/master/js/questionset.js#L22
I think this would be more maintainable and more readable if it was in a separate files, like text.ejs and result.ejs. Would this change be easy to implement? Would the h5p developers be interested in a change like this?
falcon
Tue, 12/22/2015 - 10:18
Permalink
Hi,Thank you for the feedback
Hi,
Thank you for the feedback. I believe it was included in the js files for performance reasons. H5Ps js files are aggregated by Drupal for instance, and Drupal didn't support aggregating .ejs files along with the other js files iirc.
nnyby
Tue, 12/22/2015 - 19:57
Permalink
I see. There are CSS and font
I see. There are CSS and font files being included by this plugin, e.g.: https://github.com/h5p/h5p-question-set/tree/master/css
It seems kind of arbitrary to not be able to load template files in Drupal.
falcon
Sun, 12/27/2015 - 13:10
Permalink
You may load them, just not