{"action":"created","comment":{"url":"https://api.github.com/repos/bem-site/bem-method/pulls/comments/91495745","pull_request_review_id":12003648,"id":91495745,"diff_hunk":"@@ -1,167 +1,145 @@\n-# Методология сборки БЭМ-проекта\n+# Сборка БЭМ-проекта\n \n-Любой проект, построенный по БЭМ-методологии, имеет разветвленную файловую структуру. Причина этого — компонентный подход. [Блоки](../key-concepts/key-concepts.ru.md#Блок) в БЭМ могут быть реализованы в одной или нескольких [технологиях](../key-concepts/key-concepts.ru.md#Технология-реализации). Каждая технология находится в отдельном файле. Как следствие, чтобы получить из отдельных файлов блоков общие файлы проекта, необходимо применить сборку. Для этого можно использовать любой из существующих [инструментов сборки](#Инструменты-для-сборки).\n+* [Введение](#Введение)\n+* [Задачи сборки](#Задачи-сборки)\n+* [Этапы сборки](#Этапы-сборки)\n+* [Результат сборки](#Результат-сборки)\n+* [Инструменты для сборки](#Инструменты-для-сборки)\n \n-Пример организации файловой структуры БЭМ-проекта:\n+## Введение\n \n-```files\n-blocks/                 # Уровень проекта\n-    input/              # Директория блока `input`\n-        input.css       # Реализация блока `input` в технологии CSS\n-        input.js        # Реализация блока `input` в технологии JavaScript\n-    icon/\n-        icon.css\n-\n-library/                # Уровень библиотеки\n-    input/\n-        input.js        # Базовая реализация блока `input` в технологии JavaScript\n-    button/\n-```\n+В БЭМ-проекте код разделяется на мелкие [независимые части](../filestructure/filestructure.ru.md#Принципы-организации-файловой-структуры-БЭМ-проекта) (исходные файлы). Перед отправкой в браузер файлы собираются и оптимизируются.\n \n-> Подробнее о том, зачем разделять реализацию блока на отдельные файлы читайте в документе [Организация файловой структуры БЭМ-проекта](../filestructure/filestructure.ru.md).\n+Чтобы объединить исходные файлы в один (`project.css`, `project.js`, `project.bemhtml.js` и т. п.), используется сборка. Файлы, полученные в результате сборки, в БЭМ-методологии принято называть **бандлами**.\n \n-Сборка решает следующие задачи:\n-* объединяет отдельные [файлы реализаций](../filestructure/filestructure.ru.md#Реализация-блока-разделяется-на-отдельные-файлы), разложенные по файловой структуре проекта;\n-* подключает в проект только нужные блоки, [элементы](../key-concepts/key-concepts.ru.md#Элемент) и [модификаторы](../key-concepts/key-concepts.ru.md#Модификатор) из имеющихся в файловой структуре;\n-* учитывает порядок подключения файлов в проект.\n+**Пример**\n \n-## Основные этапы сборки\n+![Сборка БЭМ-проекта](https://rawgit.com/bem-site/bem-method/godfreyd-methodology-deps/method/build/build__bem-project.svg)\n \n-Чтобы из отдельных файлов получить готовую часть проекта (результат сборки), например, веб-страницу, необходимо:\n+## Задачи сборки\n \n-* [перечислить блоки, элементы и модификаторы, участвующие в построении страницы](#Определение-списка-блоков-элементов-и-модификаторов-для-создания-страницы)\n-* [указать зависимости используемых БЭМ-сущностей](#Поиск-зависимостей)\n-* [объединить исходные файлы](#Определение-порядка-подключения-БЭМ-сущностей-в-сборку)\n+Сборка решает следующие задачи:\n \n-### Результаты сборки\n+* Объединяет исходные файлы, разложенные по файловой структуре проекта.\n+* Подключает в проект только нужные [БЭМ-сущности](../key-concepts/key-concepts.ru.md#БЭМ-сущность).\n+* Учитывает порядок подключения файлов в проект.\n+* Преобразует исходные файлы (например, `.styl` в `.css`).\n \n-В результате сборки можно получить разные финальные наборы файлов:\n+## Этапы сборки\n \n-* файлы для отдельной страницы (например, `hello.css` и `hello.js`);\n-* общие файлы для всего проекта (например, один `project.css` и `project.js`);\n-* файлы для фрагмента страницы, такого как `шапка` или `подвал`, которые используются на разных страницах проекта (например, `header.css` и `header.js`). Общая часть собирается отдельно и подключается при сборке.\n+Общий порядок сборки и роль [используемого инструмента](#Инструменты-для-сборки) могут отличаться для разных проектов. Поэтому этапы сборки в данном разделе рассматриваются как частный случай применения сборки.\n \n-Такие наборы файлов, полученные в результате сборки, в БЭМ-методологии принято называть **бандлами**.\n+Чтобы в результате сборки получить, например, веб-страницу необходимо:\n \n-> Обратите внимание, в документе сборка рассматривается на примере **страницы** — частного случая бандла.\n+1. [Определить список БЭМ-сущностей для страницы](#Определение-списка-БЭМ-сущностей).\n+2. [Описать зависимости между ними](#Описание-зависимостей).\n+3. [Определить порядок их подключения](#Определение-порядка-подключения-БЭМ-сущностей-в-сборку).\n \n-В файловой структуре результаты сборки отдельных файлов автоматически помещаются в директорию с названием страницы (например, `hello`):\n+### Определение списка БЭМ-сущностей\n \n-```files\n-blocks/                 # Директория, содержащая блоки\n+Чтобы включить в сборку только необходимые БЭМ-сущности, нужно составить список блоков, элементов и модификаторов, используемых на странице. Такой список называется [декларацией](../declarations/declarations.ru.md).\n \n-bundles/                # Директория, содержащая все результаты сборки (опционально)\n-    hello/              # Директория страницы `hello` (создается вручную)\n-```\n+Инструмент сборки, основываясь на данных из декларации, добавляет в бандлы только перечисленные БЭМ-сущности.","path":"method/build/build.ru.md","position":81,"original_position":81,"commit_id":"50e189dfedcf8efa08c2eac67e56e279572cd260","original_commit_id":"50e189dfedcf8efa08c2eac67e56e279572cd260","user":{"login":"zxqfox","id":677518,"avatar_url":"https://avatars.githubusercontent.com/u/677518?v=3","gravatar_id":"","url":"https://api.github.com/users/zxqfox","html_url":"https://github.com/zxqfox","followers_url":"https://api.github.com/users/zxqfox/followers","following_url":"https://api.github.com/users/zxqfox/following{/other_user}","gists_url":"https://api.github.com/users/zxqfox/gists{/gist_id}","starred_url":"https://api.github.com/users/zxqfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxqfox/subscriptions","organizations_url":"https://api.github.com/users/zxqfox/orgs","repos_url":"https://api.github.com/users/zxqfox/repos","events_url":"https://api.github.com/users/zxqfox/events{/privacy}","received_events_url":"https://api.github.com/users/zxqfox/received_events","type":"User","site_admin":false},"body":"добавляет → добавит?","created_at":"2016-12-08T11:29:52Z","updated_at":"2016-12-08T11:29:52Z","html_url":"https://github.com/bem-site/bem-method/pull/501#discussion_r91495745","pull_request_url":"https://api.github.com/repos/bem-site/bem-method/pulls/501","_links":{"self":{"href":"https://api.github.com/repos/bem-site/bem-method/pulls/comments/91495745"},"html":{"href":"https://github.com/bem-site/bem-method/pull/501#discussion_r91495745"},"pull_request":{"href":"https://api.github.com/repos/bem-site/bem-method/pulls/501"}}},"pull_request":{"url":"https://api.github.com/repos/bem-site/bem-method/pulls/501","id":84615265,"html_url":"https://github.com/bem-site/bem-method/pull/501","diff_url":"https://github.com/bem-site/bem-method/pull/501.diff","patch_url":"https://github.com/bem-site/bem-method/pull/501.patch","issue_url":"https://api.github.com/repos/bem-site/bem-method/issues/501","number":501,"state":"open","locked":false,"title":"[WIP] New version build for methodology","user":{"login":"godfreyd","id":6197968,"avatar_url":"https://avatars.githubusercontent.com/u/6197968?v=3","gravatar_id":"","url":"https://api.github.com/users/godfreyd","html_url":"https://github.com/godfreyd","followers_url":"https://api.github.com/users/godfreyd/followers","following_url":"https://api.github.com/users/godfreyd/following{/other_user}","gists_url":"https://api.github.com/users/godfreyd/gists{/gist_id}","starred_url":"https://api.github.com/users/godfreyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godfreyd/subscriptions","organizations_url":"https://api.github.com/users/godfreyd/orgs","repos_url":"https://api.github.com/users/godfreyd/repos","events_url":"https://api.github.com/users/godfreyd/events{/privacy}","received_events_url":"https://api.github.com/users/godfreyd/received_events","type":"User","site_admin":false},"body":"Not merge now!\n","created_at":"2016-09-09T08:53:28Z","updated_at":"2016-12-08T11:29:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4924726fc53ae98f557646b1709a605d56425bce","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bem-site/bem-method/pulls/501/commits","review_comments_url":"https://api.github.com/repos/bem-site/bem-method/pulls/501/comments","review_comment_url":"https://api.github.com/repos/bem-site/bem-method/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bem-site/bem-method/issues/501/comments","statuses_url":"https://api.github.com/repos/bem-site/bem-method/statuses/50e189dfedcf8efa08c2eac67e56e279572cd260","head":{"label":"bem-site:godfreyd-methodology-deps","ref":"godfreyd-methodology-deps","sha":"50e189dfedcf8efa08c2eac67e56e279572cd260","user":{"login":"bem-site","id":10230255,"avatar_url":"https://avatars.githubusercontent.com/u/10230255?v=3","gravatar_id":"","url":"https://api.github.com/users/bem-site","html_url":"https://github.com/bem-site","followers_url":"https://api.github.com/users/bem-site/followers","following_url":"https://api.github.com/users/bem-site/following{/other_user}","gists_url":"https://api.github.com/users/bem-site/gists{/gist_id}","starred_url":"https://api.github.com/users/bem-site/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem-site/subscriptions","organizations_url":"https://api.github.com/users/bem-site/orgs","repos_url":"https://api.github.com/users/bem-site/repos","events_url":"https://api.github.com/users/bem-site/events{/privacy}","received_events_url":"https://api.github.com/users/bem-site/received_events","type":"Organization","site_admin":false},"repo":{"id":820900,"name":"bem-method","full_name":"bem-site/bem-method","owner":{"login":"bem-site","id":10230255,"avatar_url":"https://avatars.githubusercontent.com/u/10230255?v=3","gravatar_id":"","url":"https://api.github.com/users/bem-site","html_url":"https://github.com/bem-site","followers_url":"https://api.github.com/users/bem-site/followers","following_url":"https://api.github.com/users/bem-site/following{/other_user}","gists_url":"https://api.github.com/users/bem-site/gists{/gist_id}","starred_url":"https://api.github.com/users/bem-site/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem-site/subscriptions","organizations_url":"https://api.github.com/users/bem-site/orgs","repos_url":"https://api.github.com/users/bem-site/repos","events_url":"https://api.github.com/users/bem-site/events{/privacy}","received_events_url":"https://api.github.com/users/bem-site/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bem-site/bem-method","description":"BEM — a methodology how to develop web projects applicable for any technology","fork":false,"url":"https://api.github.com/repos/bem-site/bem-method","forks_url":"https://api.github.com/repos/bem-site/bem-method/forks","keys_url":"https://api.github.com/repos/bem-site/bem-method/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bem-site/bem-method/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bem-site/bem-method/teams","hooks_url":"https://api.github.com/repos/bem-site/bem-method/hooks","issue_events_url":"https://api.github.com/repos/bem-site/bem-method/issues/events{/number}","events_url":"https://api.github.com/repos/bem-site/bem-method/events","assignees_url":"https://api.github.com/repos/bem-site/bem-method/assignees{/user}","branches_url":"https://api.github.com/repos/bem-site/bem-method/branches{/branch}","tags_url":"https://api.github.com/repos/bem-site/bem-method/tags","blobs_url":"https://api.github.com/repos/bem-site/bem-method/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bem-site/bem-method/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bem-site/bem-method/git/refs{/sha}","trees_url":"https://api.github.com/repos/bem-site/bem-method/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bem-site/bem-method/statuses/{sha}","languages_url":"https://api.github.com/repos/bem-site/bem-method/languages","stargazers_url":"https://api.github.com/repos/bem-site/bem-method/stargazers","contributors_url":"https://api.github.com/repos/bem-site/bem-method/contributors","subscribers_url":"https://api.github.com/repos/bem-site/bem-method/subscribers","subscription_url":"https://api.github.com/repos/bem-site/bem-method/subscription","commits_url":"https://api.github.com/repos/bem-site/bem-method/commits{/sha}","git_commits_url":"https://api.github.com/repos/bem-site/bem-method/git/commits{/sha}","comments_url":"https://api.github.com/repos/bem-site/bem-method/comments{/number}","issue_comment_url":"https://api.github.com/repos/bem-site/bem-method/issues/comments{/number}","contents_url":"https://api.github.com/repos/bem-site/bem-method/contents/{+path}","compare_url":"https://api.github.com/repos/bem-site/bem-method/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bem-site/bem-method/merges","archive_url":"https://api.github.com/repos/bem-site/bem-method/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bem-site/bem-method/downloads","issues_url":"https://api.github.com/repos/bem-site/bem-method/issues{/number}","pulls_url":"https://api.github.com/repos/bem-site/bem-method/pulls{/number}","milestones_url":"https://api.github.com/repos/bem-site/bem-method/milestones{/number}","notifications_url":"https://api.github.com/repos/bem-site/bem-method/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bem-site/bem-method/labels{/name}","releases_url":"https://api.github.com/repos/bem-site/bem-method/releases{/id}","deployments_url":"https://api.github.com/repos/bem-site/bem-method/deployments","created_at":"2010-08-06T06:52:01Z","updated_at":"2016-12-08T08:19:23Z","pushed_at":"2016-12-05T09:21:44Z","git_url":"git://github.com/bem-site/bem-method.git","ssh_url":"git@github.com:bem-site/bem-method.git","clone_url":"https://github.com/bem-site/bem-method.git","svn_url":"https://github.com/bem-site/bem-method","homepage":"http://bem.info","size":37318,"stargazers_count":326,"watchers_count":326,"language":"GCC Machine Description","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":95,"mirror_url":null,"open_issues_count":30,"forks":95,"open_issues":30,"watchers":326,"default_branch":"bem-info-data"}},"base":{"label":"bem-site:bem-info-data","ref":"bem-info-data","sha":"23ca63af745cceec2ca88d4260466beac908541e","user":{"login":"bem-site","id":10230255,"avatar_url":"https://avatars.githubusercontent.com/u/10230255?v=3","gravatar_id":"","url":"https://api.github.com/users/bem-site","html_url":"https://github.com/bem-site","followers_url":"https://api.github.com/users/bem-site/followers","following_url":"https://api.github.com/users/bem-site/following{/other_user}","gists_url":"https://api.github.com/users/bem-site/gists{/gist_id}","starred_url":"https://api.github.com/users/bem-site/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem-site/subscriptions","organizations_url":"https://api.github.com/users/bem-site/orgs","repos_url":"https://api.github.com/users/bem-site/repos","events_url":"https://api.github.com/users/bem-site/events{/privacy}","received_events_url":"https://api.github.com/users/bem-site/received_events","type":"Organization","site_admin":false},"repo":{"id":820900,"name":"bem-method","full_name":"bem-site/bem-method","owner":{"login":"bem-site","id":10230255,"avatar_url":"https://avatars.githubusercontent.com/u/10230255?v=3","gravatar_id":"","url":"https://api.github.com/users/bem-site","html_url":"https://github.com/bem-site","followers_url":"https://api.github.com/users/bem-site/followers","following_url":"https://api.github.com/users/bem-site/following{/other_user}","gists_url":"https://api.github.com/users/bem-site/gists{/gist_id}","starred_url":"https://api.github.com/users/bem-site/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem-site/subscriptions","organizations_url":"https://api.github.com/users/bem-site/orgs","repos_url":"https://api.github.com/users/bem-site/repos","events_url":"https://api.github.com/users/bem-site/events{/privacy}","received_events_url":"https://api.github.com/users/bem-site/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bem-site/bem-method","description":"BEM — a methodology how to develop web projects applicable for any technology","fork":false,"url":"https://api.github.com/repos/bem-site/bem-method","forks_url":"https://api.github.com/repos/bem-site/bem-method/forks","keys_url":"https://api.github.com/repos/bem-site/bem-method/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bem-site/bem-method/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bem-site/bem-method/teams","hooks_url":"https://api.github.com/repos/bem-site/bem-method/hooks","issue_events_url":"https://api.github.com/repos/bem-site/bem-method/issues/events{/number}","events_url":"https://api.github.com/repos/bem-site/bem-method/events","assignees_url":"https://api.github.com/repos/bem-site/bem-method/assignees{/user}","branches_url":"https://api.github.com/repos/bem-site/bem-method/branches{/branch}","tags_url":"https://api.github.com/repos/bem-site/bem-method/tags","blobs_url":"https://api.github.com/repos/bem-site/bem-method/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bem-site/bem-method/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bem-site/bem-method/git/refs{/sha}","trees_url":"https://api.github.com/repos/bem-site/bem-method/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bem-site/bem-method/statuses/{sha}","languages_url":"https://api.github.com/repos/bem-site/bem-method/languages","stargazers_url":"https://api.github.com/repos/bem-site/bem-method/stargazers","contributors_url":"https://api.github.com/repos/bem-site/bem-method/contributors","subscribers_url":"https://api.github.com/repos/bem-site/bem-method/subscribers","subscription_url":"https://api.github.com/repos/bem-site/bem-method/subscription","commits_url":"https://api.github.com/repos/bem-site/bem-method/commits{/sha}","git_commits_url":"https://api.github.com/repos/bem-site/bem-method/git/commits{/sha}","comments_url":"https://api.github.com/repos/bem-site/bem-method/comments{/number}","issue_comment_url":"https://api.github.com/repos/bem-site/bem-method/issues/comments{/number}","contents_url":"https://api.github.com/repos/bem-site/bem-method/contents/{+path}","compare_url":"https://api.github.com/repos/bem-site/bem-method/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bem-site/bem-method/merges","archive_url":"https://api.github.com/repos/bem-site/bem-method/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bem-site/bem-method/downloads","issues_url":"https://api.github.com/repos/bem-site/bem-method/issues{/number}","pulls_url":"https://api.github.com/repos/bem-site/bem-method/pulls{/number}","milestones_url":"https://api.github.com/repos/bem-site/bem-method/milestones{/number}","notifications_url":"https://api.github.com/repos/bem-site/bem-method/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bem-site/bem-method/labels{/name}","releases_url":"https://api.github.com/repos/bem-site/bem-method/releases{/id}","deployments_url":"https://api.github.com/repos/bem-site/bem-method/deployments","created_at":"2010-08-06T06:52:01Z","updated_at":"2016-12-08T08:19:23Z","pushed_at":"2016-12-05T09:21:44Z","git_url":"git://github.com/bem-site/bem-method.git","ssh_url":"git@github.com:bem-site/bem-method.git","clone_url":"https://github.com/bem-site/bem-method.git","svn_url":"https://github.com/bem-site/bem-method","homepage":"http://bem.info","size":37318,"stargazers_count":326,"watchers_count":326,"language":"GCC Machine Description","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":95,"mirror_url":null,"open_issues_count":30,"forks":95,"open_issues":30,"watchers":326,"default_branch":"bem-info-data"}},"_links":{"self":{"href":"https://api.github.com/repos/bem-site/bem-method/pulls/501"},"html":{"href":"https://github.com/bem-site/bem-method/pull/501"},"issue":{"href":"https://api.github.com/repos/bem-site/bem-method/issues/501"},"comments":{"href":"https://api.github.com/repos/bem-site/bem-method/issues/501/comments"},"review_comments":{"href":"https://api.github.com/repos/bem-site/bem-method/pulls/501/comments"},"review_comment":{"href":"https://api.github.com/repos/bem-site/bem-method/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bem-site/bem-method/pulls/501/commits"},"statuses":{"href":"https://api.github.com/repos/bem-site/bem-method/statuses/50e189dfedcf8efa08c2eac67e56e279572cd260"}}}}
{"actor":{"display_login":"zxqfox"}}