You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-15Lines changed: 14 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ This is a standalone server for the javascript tutorial https://javascript.info.
6
6
7
7
You can use it to run the tutorial locally and translate it into your language.
8
8
9
+
Windows, Unix-systems and MacOS are supported. For Windows, you'll need to call scripts with ".cmd" extension, that are present in the code alongside with Unix versions.
10
+
9
11
# Installation
10
12
11
13
(If you have an old copy of the English tutorial, please rename `1-js/05-data-types/09-destructuring-assignment/1-destructuring-assignment` to `1-js/05-data-types/09-destructuring-assignment/1-destruct-user`).
@@ -16,9 +18,7 @@ You can use it to run the tutorial locally and translate it into your language.
16
18
These are required to update and run the project.
17
19
For Windows just download and install, otherwise use standard OS install tools (packages or whatever convenient).
18
20
19
-
Please use Node.JS 10.
20
-
21
-
If you're using Node.JS 8, then the default NPM package manager is buggy, please update it with `npm up -g` command before you proceed.
21
+
Please use Node.JS 10+.
22
22
23
23
(Maybe later, optional) If you're going to change images, please install [GraphicsMagick](http://www.graphicsmagick.org/).
24
24
@@ -30,7 +30,7 @@ You can use it to run the tutorial locally and translate it into your language.
30
30
31
31
3. Create the root folder.
32
32
33
-
Create a folder `/js` for the project. You can use any other directory as well, just adjust the paths below.
33
+
Create a folder `/js` for the project. If you use another directory as the root, adjust the paths below.
34
34
35
35
4. Clone the tutorial server into it:
36
36
@@ -44,7 +44,7 @@ You can use it to run the tutorial locally and translate it into your language.
44
44
45
45
5. Clone the tutorial text into it.
46
46
47
-
The text repository has `"-language"` postfix at the end, e.g for the French version `fr`, for Russian – `ru` etc.
47
+
The text repository ends with the language code, e.g for the French version `...-fr`, for Russian – `...-ru` etc.
48
48
49
49
E.g. for the Russian version:
50
50
```
@@ -75,7 +75,7 @@ You can use it to run the tutorial locally and translate it into your language.
75
75
76
76
# Change server language
77
77
78
-
The server uses English by default for navigation and other non-tutorial messages.
78
+
The server uses English by default for navigation and design.
79
79
80
80
You can set another language it with the second argument of `edit`.
81
81
@@ -86,32 +86,31 @@ cd /js/javascript-tutorial-server
86
86
./edit ru ru
87
87
```
88
88
89
-
Please note, the server must support that language. That is: server code must have corresponding locale files for that language, otherwise it exists with an error. As of now, `ru`and `en` are fully supported.
89
+
Please note, the server must support that language. There must be corresponding locale files for that language in the code of the server, otherwise it exists with an error. As of now, `ru`, `en`, `zh` and `ja` are fully supported.
90
90
91
91
# Dev mode
92
92
93
-
If you'd like to edit the server code, *not* the tutorial text (assuming you're familiar with Node.js), then there are two steps.
93
+
If you'd like to edit the server code, *not* the tutorial text (assuming you're familiar with Node.js), then there are two steps to make that easy.
94
94
95
95
First, run the command that imports (and caches) the tutorial:
96
96
97
97
```
98
-
// NODE_LANG sets server language
99
-
// TUTORIAL_ROOT is the full path to tutorial repo, by default is /js/javascript-tutorial-$NODE_LANG
100
-
101
98
cd /js/javascript-tutorial-server
102
99
NODE_LANG=en TUTORIAL_ROOT=/js/javascript-tutorial-ru npm run gulp jsengine:koa:tutorial:import
103
100
```
104
-
105
-
And then `./dev <server language>` runs the server:
101
+
102
+
In the code above, `NODE_LANG` sets server language, while `TUTORIAL_ROOT` is the full path to tutorial repo, by default is `/js/javascript-tutorial-$NODE_LANG`.
103
+
104
+
Afterwards, call `./dev <server language>` to run the server:
106
105
107
106
```
108
107
cd /js/javascript-tutorial-server
109
108
./dev en
110
109
```
111
110
112
-
Running `./dev` uses the tutorial imported and cached by the previous command.
111
+
Running `./dev` uses the tutorial that was imported and cached by the previous command.
113
112
114
-
It does not watch tutorial text, but it reloads the server after code changes.
113
+
It does not "watch" tutorial text, but it reloads the server after code changes.
115
114
116
115
Again, that's for developing the server code itself, not writing the tutorial.
0 commit comments