Basic structure of a react SDK and start of an implementation.
This commit is contained in:
commit
c42733ec95
15 changed files with 407 additions and 0 deletions
11
example/index.html
Normal file
11
example/index.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Matrix Flux</title>
|
||||
</head>
|
||||
<body>
|
||||
<section id="matrixchat"></section>
|
||||
<script src="bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
12
example/lib/index.jsx
Normal file
12
example/lib/index.jsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
var React = require("react");
|
||||
// In normal usage of the module:
|
||||
//var MatrixReactSdk = require("matrix-react-sdk");
|
||||
// Or to import the source directly from the file system:
|
||||
// (This is useful for debugging the SDK as ut seems source
|
||||
// maps cannot pass through two stages).
|
||||
var MatrixReactSdk = require("../../src/index");
|
||||
|
||||
React.render(
|
||||
<MatrixReactSdk.MatrixChat />,
|
||||
document.getElementById('matrixchat')
|
||||
);
|
19
example/package.json
Normal file
19
example/package.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "matrix-react-example",
|
||||
"version": "0.0.1",
|
||||
"description": "Example usage of matrix-react-sdk",
|
||||
"author": "matrix.org",
|
||||
"license": "Apache 2",
|
||||
"devDependencies": {
|
||||
"browserify": "^10.2.3",
|
||||
"envify": "^3.4.0",
|
||||
"matrix-react-sdk": "../",
|
||||
"reactify": "^1.1.1",
|
||||
"uglifyify": "^3.0.1",
|
||||
"watchify": "^3.2.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "browserify -t [ envify --NODE_ENV production ] -t reactify -g uglifyify lib/index.jsx -o bundle.js",
|
||||
"start": "watchify -v -d -t reactify lib/index.jsx -o bundle.js"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue