Skip to content

Commit 533f32f

Browse files
authored
Merge pull request RocketChat#350 from RocketChat/feature/readme
Update readme with install issues
2 parents 6ea243b + 114d7d5 commit 533f32f

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

README.md

+30-10
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,12 @@ npm start
2727

2828
## Structure of the project
2929

30-
The application is split between two main folders...
30+
The sources is located in the `src` folder. Everything in this folder will be built automatically when running the app with `npm start`.
3131

32-
`src` - this folder is intended for files which need to be transpiled or compiled (files which can't be used directly by Electron).
33-
34-
`app` - contains all static assets (put here images, css, html etc.) which don't need any pre-processing.
32+
Stylesheets are written in `less` and are located in `src/stylesheets`. They will be build into a single `main.css` in the `app` folder.
3533

3634
The build process compiles all stuff from the `src` folder and puts it into the `app` folder, so after the build has finished, your `app` folder contains the full, runnable application.
3735

38-
Treat `src` and `app` folders like two halves of one bigger thing.
39-
40-
4136
## The build pipeline
4237

4338
Build process is founded upon [gulp](https://github.com/gulpjs/gulp) task runner and [rollup](https://github.com/rollup/rollup) bundler. There are two entry files for your code: `src/background.js` and `src/app.js`. Rollup will follow all `import` statements starting from those files and compile code of the whole dependency tree into one `.js` file for each entry point.
@@ -51,17 +46,42 @@ Side note: If the module you want to use in your app is a native one (not pure J
5146

5247
## Working with modules
5348

54-
Thanks to [rollup](https://github.com/rollup/rollup) you can (and should) use ES6 modules for all code in `src` folder. But because ES6 modules still aren't natively supported you can't use them in the `app` folder.
49+
Thanks to [rollup](https://github.com/rollup/rollup) you can (and should) use ES6 modules for most code in `src` folder.
5550

5651
Use ES6 syntax in the `src` folder like this:
5752
```js
5853
import myStuff from './my_lib/my_stuff';
5954
```
6055

61-
But use CommonJS syntax in `app` folder. So the code from above should look as follows:
56+
The exception is in `src/public`. ES6 will work inside this folder, but it is limited to what Electron/Chromium supports. The key thing to note is that you cannot use `import` and `export` statements. Imports and exports need to be done using CommonJS syntax:
57+
6258
```js
63-
var myStuff = require('./my_lib/my_stuff');
59+
const myStuff = require('./my_lib/my_stuff');
60+
const { myFunction } = require('./App');
61+
```
62+
63+
## Issues with Install
64+
65+
### node-gyp
66+
Follow the installation instruction on [node-gyp readme](https://github.com/nodejs/node-gyp#installation).
67+
68+
#### Ubuntu Install
69+
You will need to install:
70+
```sh
71+
build-essential
72+
libevas-dev
73+
libxss-dev
6474
```
75+
### Fedora Install
76+
You will need to install:
77+
```sh
78+
libX11
79+
libXScrnSaver-devel
80+
gcc-c++
81+
```
82+
83+
#### Windows 7
84+
On Windows 7 you may have to follow option 2 of the [node-gyp install guide](https://github.com/nodejs/node-gyp#installation) and install Visual Studio
6585

6686
# Testing
6787

0 commit comments

Comments
 (0)