anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

Deprecated package yepnope v1.5.3 #208

Closed Tanvez closed 1 year ago

Tanvez commented 1 year ago

We saw that the yepnope package/script is not currently maintained(last tagged version was v2.0.0 - updated in 2014). So we wanted raise an issue about future plans for the package/script. Places where the package is being used currently

We ran across this package/script because we were running into some issues where pages would inconsistently throw errors like Uncaught TypeError: Cannot read properties of null (reading 'insertBefore'). This error is likely due to yepnope not being loaded/available for use when the application first invokes/uses any of yepnope functions/methods. We have since updated the version on our fork to v1.5.4 to hopefully mitigate the issue.

Example of Error:

Screen Shot 2023-03-24 at 5 47 55 PM
craigdietrich commented 1 year ago

Getting rid of YepNope makes sense. I think the only place it's used is inside main.js. And, in main.js, I think we could replace any YepNope calls with $.getScript() calls, since all we're using it for is running functions asynchronously when scripts load.