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
npm install # Do not use root rights to install npm and bower dependencies.
31
31
```
@@ -34,46 +34,30 @@ bower dependencies are installed in the `libs` directory by `npm postinstall`.
34
34
35
35
## Usage
36
36
37
-
You could use the following tools to build the project: [ENB](https://ru.bem.info/tools/bem/enb-bem-techs/)(only in Russian) or [bem-tools](https://bem.info/tools/bem/bem-tools/). The result files are the same in both cases.
37
+
You could use the following tools to build the project: [ENB](https://ru.bem.info/tools/bem/enb-bem-techs/)(only in Russian) or [bem-tools](https://bem.info/tools/bem/bem-tools/). The result files are the same in both cases as `bem-tools` just calls `ENB` under the hood.
38
38
39
39
You can run any `enb` commands from a `node_modules/.bin/enb` directory and the `bem-tools` commands from `node_modules/bem/bin/bem`.
40
40
41
-
### Build the project with ENB
41
+
### Build the project
42
42
43
43
```bash
44
44
node_modules/.bin/enb make
45
45
```
46
-
47
-
To be able to run `enb` commands without typing a full path to an executable file (`node_modules/.bin/enb`), use:
48
-
49
-
```
50
-
export PATH=./node_modules/.bin:$PATH`
51
-
```
52
-
53
-
Now you can use `enb` from any point of your project.
54
-
55
-
```
56
-
enb make
57
-
```
58
-
59
-
### Build the project with bem-tools
60
-
61
-
To be able to run bem-tools commands without typing a full path to an executable file (`node_modules/bem/bin/bem`), use `bem-cli` npm package:
62
-
63
-
```
64
-
npm install -g bem-cli
46
+
or
47
+
```bash
48
+
node_modules/.bin/bem make
65
49
```
66
50
67
-
The alternative method:
51
+
To be able to run commands without typing a full path to an executable file (`node_modules/.bin/enb`), use:
68
52
69
53
```
70
54
export PATH=./node_modules/.bin:$PATH`
71
55
```
72
56
73
-
Now you can use `bem-tools` from any point of your project.
57
+
Now you can use `enb` or `bem` from any point of your project.
74
58
75
59
```
76
-
bem make
60
+
enb make
77
61
```
78
62
79
63
### The basic commands
@@ -85,28 +69,26 @@ You could use help option to get information about the basic commands of `enb` a
85
69
```
86
70
enb -h
87
71
```
88
-
и
72
+
and
89
73
90
74
```
91
75
bem -h
92
76
```
93
77
94
-
**Start the server with ENB**
78
+
**Start the dev server**
95
79
96
80
```bash
97
81
node_modules/.bin/enb server
98
82
```
99
-
100
-
You could use the `npm start` command to start the `enb server` without specifying the full path to the `node_modules`.
101
-
83
+
or
102
84
```bash
103
-
npm start
85
+
node_modules/.bin/bem server
104
86
```
105
87
106
-
**Start the server with bem-tools**
88
+
You could use the `npm start` command to start the `enb server` without specifying the full path to the `node_modules`.
107
89
108
90
```bash
109
-
bem server
91
+
npm start
110
92
```
111
93
112
94
The `bem server ` is running. To check it out, navigate to `http://localhost:8080/desktop.bundles/index/index.html`.
@@ -158,7 +140,6 @@ This generator provides you the ability to get the base of BEM project in few mi
158
140
159
141
## Useful tools
160
142
161
-
-[bem-cli](https://en.bem.info/blog/bem-cli/) — run bem-tools locally
162
143
-[borschik](https://en.bem.info/tools/optimizers/borschik/) — borschik is a simple but powerful builder for text-based file formats
Copy file name to clipboardexpand all lines: README.ru.md
+16-38
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@
3
3
[Project-stub](https://github.com/bem/project-stub) – это шаблонный репозиторий для создания БЭМ-проектов. Он содержит необходимый минимум конфигурационных файлов и папок, который позволяет быстро развернуть проект с нуля.
4
4
В project-stub по умолчанию подключены основные БЭМ-библиотеки:
npm install # Не используйте права суперпользователя (`root`) при установке npm- и bower-зависимостей.
30
30
```
31
31
32
-
bower-зависимости устанавливаются при выполнении `npm postinstall` в папку `libs`.
32
+
bower-зависимости автоматически устанавливаются при выполнении `npm postinstall` в папку `libs`.
33
33
34
34
## Практическое применение
35
35
36
-
Собрать проект можно с помощью [ENB](https://bem.info/tools/bem/enb-bem-techs/) или [bem-tools](https://ru.bem.info/tools/bem/bem-tools/). Результаты сборки в обоих случаях одинаковы.
36
+
Собрать проект можно с помощью [ENB](https://bem.info/tools/bem/enb-bem-techs/) или [bem-tools](https://ru.bem.info/tools/bem/bem-tools/). Результаты сборки в обоих случаях одинаковы, т.к. `bem-tools` просто проксирует вызовы к `ENB`.
37
37
38
38
Вызов всех команд `enb` возможен из папки `node_modules/.bin/enb`, а команд `bem-tools` из `./node_modules/bem/bin/bem`.
39
39
40
-
### Сборка проекта с ENB
40
+
### Сборка проекта
41
41
42
42
```bash
43
43
node_modules/.bin/enb make
44
44
```
45
-
46
-
Чтобы не указывать путь к исполняемому файлу (`node_modules/.bin/enb`) используйте:
47
-
48
-
```
49
-
export PATH=./node_modules/.bin:$PATH`
50
-
```
51
-
52
-
Теперь сборка доступна из любой точки проекта:
53
-
54
-
```
55
-
enb make
56
-
```
57
-
58
-
### Сборка проекта с bem-tools
59
-
45
+
либо
60
46
```
61
47
./node_modules/bem/bin/bem make
62
48
```
63
49
64
-
Установите npm-пакет `bem-cli`, чтобы не указывать путь к исполняемому файлу (`./node_modules/bem/bin/bem`):
65
-
66
-
```
67
-
npm install -g bem-cli
68
-
```
69
-
70
-
Или используйте альтернативный метод:
50
+
Чтобы не указывать путь к исполняемому файлу (`node_modules/.bin/enb`) используйте:
71
51
72
52
```
73
53
export PATH=./node_modules/.bin:$PATH`
74
54
```
55
+
75
56
Теперь сборка доступна из любой точки проекта:
76
57
77
58
```
78
-
bem make
59
+
enb make
79
60
```
80
61
81
62
### Базовые команды для обоих сборщиков
@@ -93,22 +74,20 @@ enb -h
93
74
bem -h
94
75
```
95
76
96
-
**Старт сервера с ENB**
77
+
**Старт сервера**
97
78
98
79
```bash
99
80
node_modules/.bin/enb server
100
81
```
101
-
102
-
Команда `npm start` также запускает `enb server`, при этом нет необходимости указывать полный путь до `node_modules`.
103
-
82
+
либо
104
83
```bash
105
-
npm start
84
+
bem server
106
85
```
107
86
108
-
**Старт сервера с bem-tools**
87
+
Команда `npm start` также запускает `enb server`, при этом нет необходимости указывать полный путь до `node_modules`.
109
88
110
89
```bash
111
-
bem server
90
+
npm start
112
91
```
113
92
114
93
На вашем компьютере запустился сервер для разработки. Чтобы проверить это, откройте в браузере `http://localhost:8080/desktop.bundles/index/index.html`.
`project-stub` – это универсальный проект-заготовка, покрывающий большинство стандартных задач БЭМ-проекта. Если вам необходимо создать оптимальную конфигурацию вашего проекта, воспользуйтесь инструментом [generator-bem-stub](https://ru.bem.info/tools/bem/bem-stub/).
119
+
`project-stub` – это универсальный проект-заготовка, покрывающий большинство стандартных задач БЭМ-проекта. Если вам необходимо создать уникальную конфигурацию вашего проекта, воспользуйтесь инструментом [generator-bem-stub](https://ru.bem.info/tools/bem/bem-stub/).
141
120
142
121
* Видео [генератор БЭМ-проектов на Yeoman](https://ru.bem.info/talks/bemup-moscow-2014/#Генератор-БЭМ-проектов-на-Yeoman-—-Евгений-Гаврюшин)
0 commit comments