|
3 | 3 | Development
|
4 | 4 | ===========
|
5 | 5 |
|
| 6 | +Installing Javascript machinery |
| 7 | +------------------------------- |
6 | 8 |
|
7 |
| -CSS live reloading |
8 |
| ------------------- |
| 9 | +Running the Notebook from the source code on Github requires some Javascript |
| 10 | +tools to build/minify the CSS and Javascript components. We do these steps when |
| 11 | +making releases, so there's no need for these tools when installing released |
| 12 | +versions of the Notebook. |
9 | 13 |
|
10 |
| -If you are working on notebook styling, you can use the live-reloading option |
11 |
| -of gulp to watch for changes in the `.less` files and automatically rebuild the |
12 |
| -`css` and reload the current page. |
| 14 | +First, install `Node.js <https://nodejs.org/>`_. The installers on the |
| 15 | +Node.js website also include Node's package manager, *npm*. Alternatively, |
| 16 | +install both of these from your package manager. For example, on Ubuntu or Debian:: |
13 | 17 |
|
14 |
| -To do so we rely on the livereaload extension of various browser (`for chrome |
15 |
| -<https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei>`_), |
16 |
| -and the gulp-livereload extension. |
17 |
| - |
18 |
| - |
19 |
| -To use the livereload extension, in the root of `notebook` project launch:: |
20 |
| - |
21 |
| - $ gulp watch |
22 |
| - |
23 |
| - |
24 |
| -Any changes to any of the less files under the `notebook/static` |
25 |
| -directory will trigger a rebuild of css and ask the reload extension to reload |
26 |
| -the current page. |
27 |
| - |
28 |
| -Do not forget to activate the extension for the current page by clicking on it. |
29 |
| -The dot at the center of the extension icon will be come darker when the extension is activated. |
| 18 | + sudo apt-get install nodejs-legacy npm |
30 | 19 |
|
| 20 | +You can then build the Javascript and CSS by running:: |
31 | 21 |
|
| 22 | + python setup.py css js |
32 | 23 |
|
| 24 | +This will automatically fetch the remaining dependencies (bower, less) and |
| 25 | +install them in a subdirectory. |
0 commit comments