Closed oliverfoster closed 5 years ago
Tracking, but a PR of this scale is going to take a bit to move forward. While I get the interest in having an NPM module with xAPI-everything included, it feels like this would make curation pretty muddy.
Will review this in the next week or so.
Let me know once you've reviewed it.
Just checking in. Any thoughts on this?
Ok, going to look at this today. Do you have a sample app.js
file or something to show it working that I could use as a starting place?
I was using the tests to do that.
This file can be run using $ mocha test/tests/test.xapiwrapper.js
https://github.com/adlnet/xAPIWrapper/blob/29154f51be1c0df8753923116100f66fdecf1a4e/test/tests/test.xapiwrapper.js
This one to get the above text running in the browser: https://github.com/adlnet/xAPIWrapper/blob/29154f51be1c0df8753923116100f66fdecf1a4e/test/textXAPIWrapper.html
It demonstrates the xapiwrapper.min.js statement, verbs, activity etc api working in both node and the browser. Launch doesn't work in node. It'll give an error.
ADL.launch()
Simple examples seem to run, will look more at it later. 👍
In the meantime, it doesn't produce intellisense and we'll probably need to have more rigorous tests with more complex statement varieties.
Yup, totally agree.
Do you have any suggestions for statement varieties?
For the intellisense I reckon it'd be easiest to produce a non-minified but compiled version with comments intact. I will have a look to see if we can just import the uncompiled source files instead though. Irritatingly the ADL object transcends multiple files but hopefully the code is segregated enough to allow that to happen without one file needing references to code in another. I don't know if it's preferable to use the uncompiled source directly? Any thoughts?
Closed in favour of https://github.com/adlnet/xAPIWrapper/pull/126 : with intellisense and a few of the more complex bits removed.
67
Works
Notes
xapiwrapper.min.js
const adl = require('xapiwrapper');
if published on npm.ADL.launch
in node