adlnet / xAPIWrapper

Wrapper to simplify communication to an LRS
https://adlnet.gov/projects/xapi/
Apache License 2.0
219 stars 114 forks source link

Wrapping functions #131

Closed oliverfoster closed 4 years ago

oliverfoster commented 5 years ago

It seems too much choice to be able to use the src files individually rather than just one minified library and it complicates the usage and dependencies of each file - xapistatement requires ADL.ruuid from xapiwrapper as an example.

I want to understand why this is the case and suggest changing it.

Stripping the wrapping functions from each src file and only supplying a bundled xapiwrapper.min.js file would bring this library in line with most other libraries of this type. It would negate the need for developers to understand the dependency structure of the src code and allow them to concentrate on using the defined API.

As far as I can tell, we can use source maps to debug the code and the whole minified library is smaller than the xapiwrapper, such that there isn't a working reason against this idea, except maybe wanting to use different verbs and activitytypes.