Skip to content

Commit 3f9f3e9

Browse files
committed
Merge pull request element-hq#998 from vector-im/rav/fix_the_sodding_deployment_instructions
Update the README to give clearer dev instructions
2 parents acb4435 + ca89c09 commit 3f9f3e9

File tree

1 file changed

+46
-13
lines changed

1 file changed

+46
-13
lines changed

README.md

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,61 @@ setup above, and your changes will cause an instant rebuild.
3030
However, all serious development on Vector happens on the `develop` branch. This typically
3131
depends on the `develop` snapshot versions of `matrix-react-sdk` and `matrix-js-sdk`
3232
too, which isn't handled by Vector's `package.json`. To get the right dependencies, check out
33-
the `develop` branches of these libraries and then use `npm link` to tell Vector
33+
the `develop` branches of these libraries and then use `ln -s` to tell Vector
3434
about them:
3535

36+
[Be aware that there may be problems with this process under npm version 3.]
37+
38+
First clone and build `matrix-js-sdk`:
39+
40+
1. `git clone git@github.com:matrix-org/matrix-js-sdk.git`
41+
1. `pushd matrix-js-sdk`
42+
1. `git checkout develop`
43+
1. `npm install`
44+
1. `npm install source-map-loader` # because webpack is made of fail
45+
1. `popd`
46+
47+
Then similarly with `matrix-react-sdk`:
48+
3649
1. `git clone git@github.com:matrix-org/matrix-react-sdk.git`
37-
2. `cd matrix-react-sdk`
50+
2. `pushd matrix-react-sdk`
3851
3. `git checkout develop`
3952
4. `npm install`
40-
5. `npm run build`
41-
6. `npm start` (to start the dev rebuilder)
42-
7. `cd ../vector-web`
43-
8. Link the react sdk package into the example:
44-
`npm link path/to/your/react/sdk`
45-
46-
Similarly, you may need to `npm link path/to/your/js/sdk` in your `matrix-react-sdk`
47-
directory.
53+
5. `rm -r node_modules/matrix-js-sdk; ln -s ../../matrix-js-sdk node_modules/`
54+
6. `popd`
55+
56+
Finally, build and start vector itself:
57+
58+
1. `git clone git@github.com:vector-im/vector-web.git`
59+
1. `cd vector-web`
60+
1. `git checkout develop`
61+
1. `npm install`
62+
1. `rm -r node_modules/matrix-js-sdk; ln -s ../../matrix-js-sdk node_modules/`
63+
1. `rm -r node_modules/matrix-react-sdk; ln -s ../../matrix-react-sdk node_modules/`
64+
1. `npm start`
65+
1. Wait a few seconds for the initial build to finish; you should see something like:
66+
67+
```
68+
Hash: b0af76309dd56d7275c8
69+
Version: webpack 1.12.14
70+
Time: 14533ms
71+
Asset Size Chunks Chunk Names
72+
bundle.js 4.2 MB 0 [emitted] main
73+
bundle.css 91.5 kB 0 [emitted] main
74+
bundle.js.map 5.29 MB 0 [emitted] main
75+
bundle.css.map 116 kB 0 [emitted] main
76+
+ 1013 hidden modules
77+
```
78+
1. Open http://127.0.0.1:8080/ in your browser to see your newly built Vector.
79+
80+
When you make changes to `matrix-js-sdk` or `matrix-react-sdk`, you will need
81+
to run `npm run build` in the relevant directory. You can do this automatically
82+
by instead running `npm start` in each directory, to start a development
83+
builder which will watch for changes to the files and rebuild automatically.
4884
4985
If you add or remove any components from the Vector skin, you will need to rebuild
5086
the skin's index by running, `npm run reskindex`.
5187
52-
You may need to run `npm i source-map-loader` in matrix-js-sdk if you get errors
53-
about "Cannot resolve module 'source-map-loader'" due to shortcomings in webpack.
54-
5588
Deployment
5689
==========
5790

0 commit comments

Comments
 (0)