adlnet / xAPIWrapper

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

NPM module #67

Open lastmjs opened 8 years ago

lastmjs commented 8 years ago

Is this repo up on NPM? I'm not able to find it, it would be nice to npm install

davewallace commented 8 years ago

I see this is on npm now, but when I add it to my package.json and run npm install I have an unmet dependency on xapi-plugins which is not hosted on npm.

creighton commented 8 years ago

I don't think that npm module is for this project. The one I found on npm pointed to https://github.com/pgorzelany/xapi-wrapper/blob/master/package.json , which looks like a stock trading script.

zpetterd commented 8 years ago

I've converted it over to a Node module, I still need to develop so comprehensive tests before merging it back into this repo.

You can install it using npm install https://github.com/zapur1/xAPIWrapper.git

It will also attach to the window if not imported using Node JS, instead including as <script> directly from source

ljwolford commented 7 years ago

Have there been any updates to a completed node module with tests?

oliverfoster commented 5 years ago

Is this really not available as a server-side node module? (edited)

timofeysie commented 5 years ago

It looks like there are two npm packages with a quick serach: This one: https://www.npmjs.com/package/xapiwrapper And one for node: https://www.npmjs.com/package/xapiwrapper-node

@oliverfoster how will you be using the package? In node, or a front end app like Angular/React/Vue?

oliverfoster commented 5 years ago

I want to use the nice statement api in node, server side, as an installable node module.

I made xapiwrapper-node from xapiwrapper by creating a shim for the browser apis which the module mostly unnecessarily depends on.

(^ I did this so that I could easily merge changes from the original repo, isolate the browser-only dependencies and as a quick test to see if it would work - it does, beautifully)

I say it mostly unnecessarily depends on the browser APIs because the xapi-launch module uses MutationObserver to listen for a settings DOM node - which seems to be a major part of its primary use-case.

From my work it seems possible to change the library to UMD and provide a cross environment implementation of XMLHttpRequest, a url parser and a globals object, etc - putting xapi-launch aside for the moment - this would mean that both browser and server-side developers could use this module to communicate with the LRS.

oliverfoster commented 5 years ago

If we can get agreement that this work is worth doing and if i can confirm that a PR would be accepted, I'll happily submit one.

davewallace commented 5 years ago

It's definitely worth doing

oliverfoster commented 5 years ago

@davewallace could i have your thoughts on these prs and their associated issues?

135

134

133

132

137

136

They are bits and piece which came out of #126 and are to help with intellisense and node support along with general bug fixes and best practise updates.

zrisha commented 4 years ago

Any chance of keeping the npm module up to date? https://www.npmjs.com/package/xapiwrapper