Skip to content

Commit c45b4ac

Browse files
authored
Merge pull request #226 from ZahraTee/readme-build-updates
Update the README's build instructions
2 parents 1d1fd33 + 1e52a96 commit c45b4ac

File tree

1 file changed

+8
-26
lines changed

1 file changed

+8
-26
lines changed

README.md

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ edges.
2828
* [Building](#building)
2929
* [Contributing](#contributing)
3030

31-
### Screen shots
31+
### Screenshots
3232

3333
![cargo src screenshot - source view](overview.png)
3434

@@ -49,7 +49,7 @@ edges.
4949
![cargo src screenshot - source view](right-click.png)
5050

5151

52-
## Installing and running
52+
## <a id="installing"></a> Installing and running
5353

5454
Requires a nightly version of Rust.
5555

@@ -65,7 +65,7 @@ build). You can browse the source in whilst indexing, but you'll be missing all
6565
the good stuff like jump-to-def and search.
6666

6767

68-
## Customisation
68+
## <a id="customisation"></a> Customisation
6969

7070
Create a `rustw.toml` file in your project's directory. See [src/config.rs](src/config.rs)
7171
or run `cargo src -- -h` for the options available and their defaults.
@@ -88,33 +88,15 @@ vcs_link = "https://github.com/nrc/rustw-test/blob/master/$file#L$line"
8888
For links to the code in version control, GitHub, in the example.
8989

9090

91-
## Building and running
91+
## <a id="building"></a> Building
9292

9393
Requires a nightly version of Rust.
9494

9595
Get the source code from https://github.com/nrc/cargo-src.
9696

97-
* setup the React/webpack environment (requires npm):
98-
```sh
99-
npm install
100-
101-
# if you have yarn installed:
102-
103-
yarn
104-
105-
# if not:
106-
107-
npm install --save react react-dom
108-
npm install --save react-treebeard
109-
npm install --save-dev babel-loader babel-core
110-
npm install --save-dev babel-preset-react
111-
npm install --save-dev babel-preset-es2015
112-
npm install --save-dev babel-plugin-transform-object-rest-spread
113-
npm install --save-dev webpack
114-
npm install --save-dev immutable
115-
```
116-
* build the JS components: `npm run build` or `yarn build`
117-
* `cargo build --release` to build the Rust parts.
97+
* Install the dependencies: `npm install` or `yarn`
98+
* Build the JS components: `npm run build` or `yarn build`
99+
* Build the Rust parts: `cargo build --release`
118100

119101
### Running
120102

@@ -151,7 +133,7 @@ On MacOS:
151133
export DYLD_LIBRARY_PATH=$(rustc --print sysroot)/lib:$DYLD_LIBRARY_PATH
152134
```
153135

154-
## Contributing
136+
## <a id="contributing"></a> Contributing
155137

156138
Cargo src is open source (dual-licensed under the Apache 2.0 and MIT licenses)
157139
and contributions are welcome! You can help by testing and

0 commit comments

Comments
 (0)