1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-31 10:22:04 +03:00
Kegan Dougal fd2bd4784d Fix linters
2015-06-09 16:08:14 +01:00
2015-06-09 16:08:14 +01:00
2015-06-03 10:08:31 +01:00
2015-03-04 17:37:46 +00:00
2015-06-08 10:53:31 +01:00
2015-06-08 17:48:59 +01:00

Matrix Javascript SDK

image

This is the Matrix Client-Server v1 SDK for JavaScript. This SDK can be run in a browser or in Node.js.

Quickstart

In a browser

Copy dist/browser-matrix-$VERSION.js and add that as a <script> to your page. There will be a global variable matrixcs attached to window through which you can access the SDK.

Please check examples/browser for a working example.

In Node.js

npm install matrix-js-sdk

var sdk = require("matrix-js-sdk");
var client = sdk.createClient("https://matrix.org");
client.publicRooms(function(err, data) {
  console.log("Public Rooms: %s", JSON.stringify(data));
});

Please check examples/node to see a working version.

Contributing

This section is for people who want to modify the SDK. If you just want to use this SDK, skip this section.

First, you need to pull in the right build tools:

$ npm install

Building

To build a browser version from scratch when developing:

$ npm run build

To constantly do builds when files are modified (using watchify):

$ npm run watch

To run tests (Jasmine):

$ npm test

To run linters (Google Closure Linter and JSHint):

$ npm run lint
Description
Клиент-серверный SDK Matrix для JavaScript
Readme 249 MiB
Languages
TypeScript 99.4%
Python 0.4%
JavaScript 0.2%