@@ -3,8 +3,23 @@ Vector/Web
33
44Vector is a Matrix web client built using the Matrix React SDK (https://github.com/matrix-org/matrix-react-sdk ).
55
6- Getting started
6+ Getting Started
77===============
8+ Vector is a modular webapp built with modern ES6 and requires and npm build system to build.
9+ Instructions for building are below, but building from source shouldn't be necessary
10+ for simple deployments.
11+
12+ 1 . Download the latest version from https://vector.im/packages/
13+ 1 . Untar the tarball on your web server
14+ 1 . Move (or symlink) the vector-x.x.x directory to an appropriate name
15+ 1 . If desired, copy ` config.sample.json ` to ` config.json ` and edit it
16+ as desired. See below for details.
17+ 1 . Enter the URL into your browser and log into vector!
18+
19+ Building From Source
20+ ====================
21+
22+ If you do wish to build vector from source:
823
9241 . Install or update ` node.js ` so that your ` npm ` is at least at version ` 2.0.0 `
10251 . Clone the repo: ` git clone https://github.com/vector-im/vector-web.git `
@@ -13,51 +28,35 @@ Getting started
13281 . If you are using the ` develop ` branch of vector, you will probably need to
1429 rebuild one of the dependencies, due to https://github.com/npm/npm/issues/3055 :
1530 ` (cd node_modules/matrix-react-sdk && npm install) `
16- 1 . Start the development builder and a testing server: ` npm start `
17- 1 . Wait a few seconds for the initial build to finish (the command won't
18- terminate: it's running a web server for you).
19- 1 . Open http://127.0.0.1:8080/ in your browser to see your newly built Vector .
31+ 1 . Configure the app by modifying the ` config.json ` file (see below for details)
32+ 1 . ` npm run package ` to build a tarball to deploy. Untaring this file will give
33+ a version-specific directory containing all the files that need to go on your
34+ web server .
2035
21- With ` npm start ` , any changes you make to the source files will cause a rebuild so
22- your changes will show up when you refresh. This development server also disables
23- caching, so do NOT use it in production.
36+ Note that ` npm run package ` is not supported on Windows, so Windows users can run `npm
37+ run build` , which will build all the necessary files into the ` vector`
38+ directory. The version of Vector will not appear in Settings without
39+ using the package script. You can then mount the vector directory on your
40+ webserver to actually serve up the app, which is entirely static content.
2441
25- Configuring
42+ config.json
2643===========
2744
28- Configure the app by modifying the ` config.json ` file:
45+ You can configure the app by modifying the ` config.json ` file:
2946
30471 . ` default_hs_url ` is the default home server url.
31481 . ` default_is_url ` is the default identity server url (this is the server used
3249 for verifying third party identifiers like email addresses). If this is blank,
3350 registering with an email address or adding an email address to your account
3451 will not work.
3552
36- You will need to re-run ` npm run build ` after editing ` config.json ` .
37-
38- Deployment
39- ==========
40-
41- On a Unix-based OS, run ` npm run package ` to build a tarball package. Untaring
42- this file will give a version-specific directory containing all the files that
43- need to go on your web server.
44-
45- The package script is not supported on Windows, so Windows users can run `npm
46- run build` , which will build all the necessary files into the ` vector`
47- directory. Note that the version of Vector will not appear in Settings without
48- using the package script. You can then mount the vector directory on your
49- webserver to actually serve up the app, which is entirely static content.
50-
5153Development
5254===========
5355
54- For simple tweaks, you can work on any of the source files within Vector with
55- the setup above, and your changes will cause an instant rebuild.
56-
57- However, much of the functionality in Vector is actually in the
58- ` matrix-react-sdk ` and ` matrix-js-sdk ` modules. It is possible to set these up
59- in a way that makes it easy to track the ` develop ` branches in git and to make
60- local changes without having to manually rebuild each time.
56+ Much of the functionality in Vector is actually in the ` matrix-react-sdk ` and
57+ ` matrix-js-sdk ` modules. It is possible to set these up in a way that makes it
58+ easy to track the ` develop ` branches in git and to make local changes without
59+ having to manually rebuild each time.
6160
6261[ Be aware that there may be problems with this process under npm version 3.]
6362
@@ -102,7 +101,8 @@ Finally, build and start vector itself:
102101 + 1013 hidden modules
103102 ```
104103 Remember, the command will not terminate since it runs the web server
105- and rebuilds source files when they change.
104+ and rebuilds source files when they change. This development server also
105+ disables caching, so do NOT use it in production.
1061061. Open http://127.0.0.1:8080/ in your browser to see your newly built Vector.
107107
108108When you make changes to `matrix-js-sdk` or `matrix-react-sdk`, you will need
0 commit comments