xAPIWrapper icon indicating copy to clipboard operation
xAPIWrapper copied to clipboard

NPM module

Open lastmjs opened this issue 8 years ago • 11 comments

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

lastmjs avatar May 05 '16 00:05 lastmjs

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.

davewallace avatar Aug 16 '16 03:08 davewallace

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.

creighton avatar Aug 17 '16 12:08 creighton

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

zpetterd avatar Sep 13 '16 07:09 zpetterd

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

ljwolford avatar Mar 08 '17 18:03 ljwolford

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

oliverfoster avatar Jan 30 '19 22:01 oliverfoster

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?

timofeysie avatar Feb 07 '19 01:02 timofeysie

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 avatar Feb 07 '19 09:02 oliverfoster

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.

oliverfoster avatar Feb 07 '19 10:02 oliverfoster

It's definitely worth doing

davewallace avatar Feb 07 '19 10:02 davewallace

@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.

oliverfoster avatar Feb 20 '19 16:02 oliverfoster

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

zrisha avatar Jun 01 '20 18:06 zrisha