@@ -30,28 +30,58 @@ setup above, and your changes will cause an instant rebuild.
3030However, all serious development on Vector happens on the ` develop ` branch. This typically
3131depends on the ` develop ` snapshot versions of ` matrix-react-sdk ` and ` matrix-js-sdk `
3232too, 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
3434about 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+
36491 . ` git clone git@github.com:matrix-org/matrix-react-sdk.git `
37- 2 . ` cd matrix-react-sdk`
50+ 2 . ` pushd matrix-react-sdk`
38513 . ` git checkout develop `
39524 . ` 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+ Hash: b0af76309dd56d7275c8
67+ Version: webpack 1.12.14
68+ Time: 14533ms
69+ Asset Size Chunks Chunk Names
70+ bundle.js 4.2 MB 0 [ emitted] main
71+ bundle.css 91.5 kB 0 [ emitted] main
72+ bundle.js.map 5.29 MB 0 [ emitted] main
73+ bundle.css.map 116 kB 0 [ emitted] main
74+ + 1013 hidden modules
75+ 1 . Open http://127.0.0.1:8080/ in your browser to see your newly built Vector.
76+
77+ When you make changes to ` matrix-js-sdk ` or ` matrix-react-sdk ` , you will need
78+ to run ` npm run build ` in the relevant directory. You can do this automatically
79+ by instead running ` npm start ` in each directory, to start a development
80+ builder which will watch for changes to the files and rebuild automatically.
4881
4982If you add or remove any components from the Vector skin, you will need to rebuild
5083the skin's index by running, ` npm run reskindex ` .
5184
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-
5585Deployment
5686==========
5787
0 commit comments