Skip to content

Commit e5a4e5b

Browse files
committed
Add more detail to the getting started instructions.
1 parent 76cc258 commit e5a4e5b

1 file changed

Lines changed: 30 additions & 6 deletions

File tree

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,34 @@ matrix-react-sdk
33

44
This is a react-based SDK for inserting a Matrix chat client into a web page
55

6-
1. Install or update `node.js so that your `npm` is at least at version `2.3.0`
7-
2. Clone the repo `git clone https://github.com/matrix-org/matrix-react-sdk.git`
8-
3. Navigate to example folder and install dependencies `cd example; npm install`
9-
4. Go back to root folder and build CSS `cd ..; npm install; npm run start:css`
10-
5. Copy builds `cd example; cp../bundle.css ./; npm start`
6+
Getting started with the example
7+
================================
8+
9+
1. Install or update `node.js` so that your `npm` is at least at version `2.0.0`
10+
2. Clone the repo: `git clone https://github.com/matrix-org/matrix-react-sdk.git`
11+
3. Switch to your new checkout: `cd matrix-react-sdk`
12+
4. Build the CSS: `npm install && npm run build:css`
13+
5. Switch to the example: `cd example`
14+
6. Build the javascript & copy the CSS:
15+
`npm install && npm run build && ln -s ../bundle.css ./`
16+
17+
Serve the app from within the `example` directory by running `python -m
18+
SimpleHTTPServer 8000` and access it at
19+
[http://127.0.0.1:8000](http://127.0.0.1:8000/)
20+
21+
Using the example app for development
22+
=====================================
23+
24+
To develop using the example app, you can avoid havign to repeat the above
25+
steps each time you change something:
26+
27+
1. Perform all the steps above
28+
2. In the matrix-react-sdk directory: `npm run start:css`
29+
3. Open a new terminal window in the matrix-react-sdk directory:
30+
`cd example; npm start`
31+
32+
Now, development version of your Javascript and CSS will be rebuilt whenever
33+
you change any of the files (although you may need to restart the CSS builder
34+
if you add a new file). Note that the debug CSS and Javascript are much, much
35+
larger than the production versions.
1136

12-
Serve the app from within the `example` directory by running `python -m SimpleHTTPServer 8000` and access it at [http://0.0.0.0:8000](http://0.0.0.0:8000/)

0 commit comments

Comments
 (0)