| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,17 +6,17 @@ 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. | ||
| 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 | 10 | ||
| 11 | 11 | # Installation | |
| 12 | 12 | ||
| 13 | 13 | 1. Install [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org). | |
| 14 | 14 | ||
| 15 | 15 | These are required to update and run the project. | |
| 16 | 16 | For Windows just download and install, otherwise use standard OS install tools (packages or whatever convenient). | |
| 17 | - | ||
| 18 | - Please use Node.js 10+. | ||
| 19 | - | ||
| 17 | + | ||
| 18 | + Please use Node.js 10+. | ||
| 19 | + | ||
| 20 | 20 | (Maybe later, optional) If you're going to change images, please install [GraphicsMagick](http://www.graphicsmagick.org/). | |
| 21 | 21 | ||
| 22 | 22 | 2. Install global Node modules: | |
@@ -58,7 +58,7 @@ Windows, Unix systems and macOS are supported. For Windows, you'll need to call | |||
| 58 | 58 | cd /js/server | |
| 59 | 59 | npm install | |
| 60 | 60 | ``` | |
| 61 | - | ||
| 61 | + | ||
| 62 | 62 | Run the site with the same language. Above we cloned `en` tutorial, so: | |
| 63 | 63 | ||
| 64 | 64 | ``` | |
@@ -73,10 +73,10 @@ Windows, Unix systems and macOS are supported. For Windows, you'll need to call | |||
| 73 | 73 | ||
| 74 | 74 | 7. Edit the tutorial | |
| 75 | 75 | ||
| 76 | - As you edit text files in the tutorial text repository (cloned at step 5), | ||
| 77 | - the webpage will reload automatically. | ||
| 76 | + As you edit text files in the tutorial text repository (cloned at step 5), | ||
| 77 | + the webpage will reload automatically. | ||
| 78 | + | ||
| 78 | 79 | ||
| 79 | - | ||
| 80 | 80 | # Change server language | |
| 81 | 81 | ||
| 82 | 82 | The server uses English by default for navigation and design. | |
@@ -91,7 +91,7 @@ cd /js/server | |||
| 91 | 91 | ``` | |
| 92 | 92 | ||
| 93 | 93 | 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. | |
| 94 | - | ||
| 94 | + | ||
| 95 | 95 | # Dev mode | |
| 96 | 96 | ||
| 97 | 97 | If you'd like to edit the server code (assuming you're familiar with Node.js), *not* the tutorial text, then there are two steps to do. | |
@@ -101,14 +101,14 @@ First, run the command that imports (and caches) the tutorial: | |||
| 101 | 101 | ``` | |
| 102 | 102 | cd /js/server | |
| 103 | 103 | NODE_LANG=en TUTORIAL_ROOT=/js/en.javascript.info npm run gulp engine:koa:tutorial:import | |
| 104 | - ``` | ||
| 104 | + ``` | ||
| 105 | 105 | ||
| 106 | 106 | For Windows: `npm i -g cross-env` and prepend the call with `cross-env` to pass environment variables, like this: | |
| 107 | 107 | ||
| 108 | 108 | ``` | |
| 109 | 109 | cd /js/server | |
| 110 | 110 | cross-env NODE_LANG=en... | |
| 111 | - ``` | ||
| 111 | + ``` | ||
| 112 | 112 | ||
| 113 | 113 | In the code above, `NODE_LANG` sets server language, while `TUTORIAL_ROOT` is the full path to tutorial repo, by default is `/js/$NODE_LANG.javascript.info`. | |
| 114 | 114 | ||
@@ -119,12 +119,12 @@ cd /js/server | |||
| 119 | 119 | ./dev en | |
| 120 | 120 | ``` | |
| 121 | 121 | ||
| 122 | - Running `./dev` uses the tutorial that was imported and cached by the previous command. | ||
| 122 | + Running `./dev` uses the tutorial that was imported and cached by the previous command. | ||
| 123 | 123 | ||
| 124 | 124 | It does not "watch" tutorial text, but it reloads the server after code changes. | |
| 125 | - | ||
| 125 | + | ||
| 126 | 126 | Again, that's for developing the server code itself, not writing the tutorial. | |
| 127 | - | ||
| 127 | + | ||
| 128 | 128 | # Troubleshooting | |
| 129 | 129 | ||
| 130 | 130 | If you have a very 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`. | |
@@ -135,7 +135,7 @@ If it still doesn't work – [file an issue](https://github.com/javascript-tutor | |||
| 135 | 135 | ||
| 136 | 136 | Please pull the very latest git code and install latest NPM modules before publishing an issue. | |
| 137 | 137 | ||
| 138 | - -- | ||
| 139 | - Yours, | ||
| 140 | - Ilya Kantor | ||
| 138 | + -- | ||
| 139 | + Yours, | ||
| 140 | + Ilya Kantor | ||
| 141 | 141 | iliakan@javascript.info | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,4 +25,3 @@ p | |||
| 25 | 25 | ||
| 26 | 26 | .invisible | |
| 27 | 27 | visibility hidden | |
| 28 | - | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | $clearfix | |
| 2 | - &::after | ||
| 2 | + &::after | ||
| 3 | 3 | content "" | |
| 4 | 4 | display block | |
| 5 | 5 | overflow hidden | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,5 +11,5 @@ | |||
| 11 | 11 | padding 1px 0 | |
| 12 | 12 | border-radius 4px | |
| 13 | 13 | ||
| 14 | - @media print | ||
| 14 | + @media print | ||
| 15 | 15 | page-break-inside: avoid; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | mixin textarea-input(data) | |
| 2 | 2 | - data = data || {} | |
| 3 | - | ||
| 3 | + | ||
| 4 | 4 | +b('textarea').textarea-input(class={ | |
| 5 | 5 | '_color_red': data.color === 'red' | |
| 6 | 6 | })&attributes(attributes) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ block main | |||
| 9 | 9 | include ../blocks/breadcrumbs | |
| 10 | 10 | ||
| 11 | 11 | block over-title | |
| 12 | - | ||
| 12 | + | ||
| 13 | 13 | if title | |
| 14 | 14 | - var parts = title.split('\n'); | |
| 15 | 15 | h1.main__header-title | |
| Back | FazBrowse Home | New Git URL |
0 commit comments