Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM module #67

Open
lastmjs opened this issue May 5, 2016 · 11 comments
Open

NPM module #67

lastmjs opened this issue May 5, 2016 · 11 comments

Comments

@lastmjs
Copy link

lastmjs commented May 5, 2016

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

@davewallace
Copy link

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
Copy link
Contributor

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
Copy link

zpetterd commented Sep 13, 2016

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
Copy link
Contributor

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

@oliverfoster
Copy link
Contributor

oliverfoster commented Jan 30, 2019

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

@timofeysie
Copy link

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
Copy link
Contributor

oliverfoster commented Feb 7, 2019

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
Copy link
Contributor

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
Copy link

It's definitely worth doing

@oliverfoster
Copy link
Contributor

oliverfoster commented Feb 20, 2019

@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
Copy link

zrisha commented Jun 1, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants