Get JSON content from MediaWiki using JSONP
Install normally with npm.
npm install --save mediawiki-storage
Get the source code from Wikimedia's Gerrit repository.
git clone https://gerrit.wikimedia.org/r/analytics/mediawiki-storage
We're using Bower for production dependencies, Karma as a test runner and Gulp as a build tool. Then, install the dependencies to be able to build and run mediawiki-storage and its tests.
cd mediawiki-storage
npm install
Now you can run Gulp tasks to lint, build and clean the project; Where command can be one of: lint, build or clean. If you omit command, Gulp defaults to executing build task.
npm run gulp <command>
You can also run the tests, and let Karma test runner watch all files and execute all tests on changes with:
npm run karma start
Or run both gulp build and karma start with:
npm test
See the API documentation here.
In the future, we'd like to add write capability to the library, so that we can also update the contents of MediaWiki JSON pages.