{"action":"created","comment":{"url":"https://api.github.com/repos/bem/bem-method/pulls/comments/44127276","id":44127276,"diff_hunk":"@@ -0,0 +1,176 @@\n+# Методология сборки БЭМ-проекта\n+\n+Компонентный подход в БЭМ-методологии определяет структуру проекта в файловой системе. Интерфейс разделяется на отдельные компоненты — блоки. Каждый компонент располагается в своей директории. Поэтому для получения рабочего БЭМ-проекта необходима сборка.\n+\n+Сборка решает следующие задачи:\n+* собирает отдельные [файлы реализаций](../filesystem/filesystem.ru.md#Реализация-блока-разделяется-на-отдельные-файлы), разложенные по файловой системе;\n+* включает в сборку только нужные [блоки](../definitions/definitions.ru.md#Блок), [элементы](../definitions/definitions.ru.md#Элемент) и [модификаторы](../definitions/definitions.ru.md#Модификатор) из имеющихся в проекте;\n+* учитывает порядок подключения файлов в сборку.\n+\n+Рассмотрим организацию файловой структуры БЭМ-проекта.\n+\n+Блоки могут быть реализованы в одной или нескольких [технологиях](../definitions/definitions.ru.md#Технология-реализации). Каждая технология реализации находятся в отдельном файле. [Реализация](../definitions/definitions.ru.md#Реализация-блока) блока, элемента или модификатора может быть дополнительно разделена по [уровням переопределения](../definitions/definitions.ru.md#Уровень-переопределения).\n+\n+Например:\n+\n+```\n+blocks/                 # Уровень проекта\n+    input/              # Директория блока `input`\n+        input.css       # Реализация блока `input` в технологии CSS\n+        input.js        # Реализация блока `input` в технологии JavaScript\n+    icon/\n+        icon.css\n+library/                # Уровень библиотеки\n+    input/\n+    button/\n+```\n+\n+>Подробно о целях разделения блоков на отдельные файлы читайте в документе [Организация файловой системы БЭМ-проекта](../filesystem/filesystem.ru.md).\n+\n+## Основные этапы сборки\n+\n+Чтобы из отдельных файлов получить рабочую страницу (результат сборки), необходимо:\n+\n+* [перечислить блоки, элементы и модификаторы, участвующие в построении страницы](#Перечисление-необходимых-блоков-и-элементов-для-создания-страницы)\n+* [указать зависимости используемых БЭМ-сущностей](#Поиск-необходимых-зависимостей-используемых-БЭМ-сущностей)\n+* [собрать исходные файлы](#Определение-порядка-подключения-БЭМ-сущностей-в-сборку)\n+\n+<a name=\"bundle\"></a>\n+### Результаты сборки\n+\n+В результате сборки можно получить разные финальные наборы файлов:\n+\n+* файлы для отдельной страницы (например, `hello-page.css` и `hello-page.js`);\n+* общие файлы для всего проекта (например, один `project.css` и `project.js` и отдельные шаблоны для каждой страницы);\n+* файлы для фрагмента страницы (например, `header.css` и `header.js`.) Используются, когда существует общая часть для всех страниц проекта, которая собирается отдельно и подключается при сборке.\n+\n+Такие наборы файлов, полученные в результате сборки, в БЭМ-методологии принято называть **бандлами**.\n+\n+> Обратите внимание, в документе сборка рассматривается на примере **страницы** — частного случая бандла.\n+\n+В файловой системе собранные файлы помещаются в отдельную директорию с названием страницы (например, `hello-page`):\n+\n+```\n+blocks/                # Директория, содержащая блоки\n+bundles/               # Директория, содержащая все результаты сборки\n+    hello-page/        # Директория страницы `hello-page`\n+```\n+\n+Пример файловой системы БЭМ-проекта до выполнения сборки:\n+\n+```\n+blocks/                      # Директория, содержащая блоки\n+bundles/                     # Директория, содержащая все результаты сборки\n+    hello-page/              # Директория страницы `hello-page`\n+        hello-page.decl.js   # Список БЭМ-сущностей, которые необходимы для страницы `hello-page`\n+```\n+\n+Пример файловой системы БЭМ-проекта после выполнения сборки:\n+\n+```\n+blocks/                      # Директория, содержащая блоки\n+bundles/                     # Директория, содержащая все результаты сборки\n+    hello-page/              # Директория страницы `hello-page`\n+        hello-page.decl.js   # Список БЭМ-сущностей, которые необходимы для страницы `hello-page`\n+        hello-page.css       # Собранный CSS-файл страницы `hello-page`\n+        hello-page.js        # Собранный JavaScript-файл страницы `hello-page`\n+```\n+\n+При сборке в проект могут быть включены:\n+\n+* все БЭМ-сущности с файловой системы (что значительно увеличивает объем результирующего кода);\n+* только необходимые для построения страницы БЭМ-сущности в строго определенном порядке.\n+\n+Для сборки в проект только нужных БЭМ-сущностей используются (опционально):\n+\n+* [Декларация](#Определение-списка-блоков-элементов-и-модификаторов-для-создания-страницы) — определяет список БЭМ-сущностей, необходимых для создания страницы.\n+* [Зависимости](#Поиск-зависимостей) — определяют дополнительные БЭМ-сущности.\n+* [Уровни переопределения](#Определение-порядка-подключения-БЭМ-сущностей-в-сборку) — определяют порядок подключения БЭМ-сущностей в сборку.\n+\n+### Определение списка блоков, элементов и модификаторов для создания страницы\n+\n+Чтобы начать сборку страницы, необходимо узнать, из чего она состоит.","path":"method/build-method/build-method.ru.md","position":92,"original_position":92,"commit_id":"878e3822c5df8688910ab0311d7ebcf54601bfc5","original_commit_id":"878e3822c5df8688910ab0311d7ebcf54601bfc5","user":{"login":"maslinych","id":784009,"avatar_url":"https://avatars.githubusercontent.com/u/784009?v=3","gravatar_id":"","url":"https://api.github.com/users/maslinych","html_url":"https://github.com/maslinych","followers_url":"https://api.github.com/users/maslinych/followers","following_url":"https://api.github.com/users/maslinych/following{/other_user}","gists_url":"https://api.github.com/users/maslinych/gists{/gist_id}","starred_url":"https://api.github.com/users/maslinych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maslinych/subscriptions","organizations_url":"https://api.github.com/users/maslinych/orgs","repos_url":"https://api.github.com/users/maslinych/repos","events_url":"https://api.github.com/users/maslinych/events{/privacy}","received_events_url":"https://api.github.com/users/maslinych/received_events","type":"User","site_admin":false},"body":"тут тоже с субъектом неочевидно: кто должен понять — пользователь или система? нужно снять неоднозначность","created_at":"2015-11-06T11:21:11Z","updated_at":"2015-11-06T11:21:11Z","html_url":"https://github.com/bem/bem-method/pull/338#discussion_r44127276","pull_request_url":"https://api.github.com/repos/bem/bem-method/pulls/338","_links":{"self":{"href":"https://api.github.com/repos/bem/bem-method/pulls/comments/44127276"},"html":{"href":"https://github.com/bem/bem-method/pull/338#discussion_r44127276"},"pull_request":{"href":"https://api.github.com/repos/bem/bem-method/pulls/338"}}},"pull_request":{"url":"https://api.github.com/repos/bem/bem-method/pulls/338","id":48747298,"html_url":"https://github.com/bem/bem-method/pull/338","diff_url":"https://github.com/bem/bem-method/pull/338.diff","patch_url":"https://github.com/bem/bem-method/pull/338.patch","issue_url":"https://api.github.com/repos/bem/bem-method/issues/338","number":338,"state":"closed","locked":false,"title":"Documentation: bem build update","user":{"login":"innabelaya","id":6286656,"avatar_url":"https://avatars.githubusercontent.com/u/6286656?v=3","gravatar_id":"","url":"https://api.github.com/users/innabelaya","html_url":"https://github.com/innabelaya","followers_url":"https://api.github.com/users/innabelaya/followers","following_url":"https://api.github.com/users/innabelaya/following{/other_user}","gists_url":"https://api.github.com/users/innabelaya/gists{/gist_id}","starred_url":"https://api.github.com/users/innabelaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innabelaya/subscriptions","organizations_url":"https://api.github.com/users/innabelaya/orgs","repos_url":"https://api.github.com/users/innabelaya/repos","events_url":"https://api.github.com/users/innabelaya/events{/privacy}","received_events_url":"https://api.github.com/users/innabelaya/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-26T14:39:20Z","updated_at":"2015-11-06T11:21:11Z","closed_at":"2015-10-29T11:20:43Z","merged_at":"2015-10-29T11:20:43Z","merge_commit_sha":"023b9c8e9c276923e8685cb646fc3cb2ad01e157","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bem/bem-method/pulls/338/commits","review_comments_url":"https://api.github.com/repos/bem/bem-method/pulls/338/comments","review_comment_url":"https://api.github.com/repos/bem/bem-method/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bem/bem-method/issues/338/comments","statuses_url":"https://api.github.com/repos/bem/bem-method/statuses/878e3822c5df8688910ab0311d7ebcf54601bfc5","head":{"label":"bem:bem-build-update","ref":"bem-build-update","sha":"878e3822c5df8688910ab0311d7ebcf54601bfc5","user":{"login":"bem","id":223412,"avatar_url":"https://avatars.githubusercontent.com/u/223412?v=3","gravatar_id":"","url":"https://api.github.com/users/bem","html_url":"https://github.com/bem","followers_url":"https://api.github.com/users/bem/followers","following_url":"https://api.github.com/users/bem/following{/other_user}","gists_url":"https://api.github.com/users/bem/gists{/gist_id}","starred_url":"https://api.github.com/users/bem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem/subscriptions","organizations_url":"https://api.github.com/users/bem/orgs","repos_url":"https://api.github.com/users/bem/repos","events_url":"https://api.github.com/users/bem/events{/privacy}","received_events_url":"https://api.github.com/users/bem/received_events","type":"Organization","site_admin":false},"repo":{"id":820900,"name":"bem-method","full_name":"bem/bem-method","owner":{"login":"bem","id":223412,"avatar_url":"https://avatars.githubusercontent.com/u/223412?v=3","gravatar_id":"","url":"https://api.github.com/users/bem","html_url":"https://github.com/bem","followers_url":"https://api.github.com/users/bem/followers","following_url":"https://api.github.com/users/bem/following{/other_user}","gists_url":"https://api.github.com/users/bem/gists{/gist_id}","starred_url":"https://api.github.com/users/bem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem/subscriptions","organizations_url":"https://api.github.com/users/bem/orgs","repos_url":"https://api.github.com/users/bem/repos","events_url":"https://api.github.com/users/bem/events{/privacy}","received_events_url":"https://api.github.com/users/bem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bem/bem-method","description":"BEM — a methodology how to develop web projects applicable for any technology","fork":false,"url":"https://api.github.com/repos/bem/bem-method","forks_url":"https://api.github.com/repos/bem/bem-method/forks","keys_url":"https://api.github.com/repos/bem/bem-method/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bem/bem-method/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bem/bem-method/teams","hooks_url":"https://api.github.com/repos/bem/bem-method/hooks","issue_events_url":"https://api.github.com/repos/bem/bem-method/issues/events{/number}","events_url":"https://api.github.com/repos/bem/bem-method/events","assignees_url":"https://api.github.com/repos/bem/bem-method/assignees{/user}","branches_url":"https://api.github.com/repos/bem/bem-method/branches{/branch}","tags_url":"https://api.github.com/repos/bem/bem-method/tags","blobs_url":"https://api.github.com/repos/bem/bem-method/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bem/bem-method/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bem/bem-method/git/refs{/sha}","trees_url":"https://api.github.com/repos/bem/bem-method/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bem/bem-method/statuses/{sha}","languages_url":"https://api.github.com/repos/bem/bem-method/languages","stargazers_url":"https://api.github.com/repos/bem/bem-method/stargazers","contributors_url":"https://api.github.com/repos/bem/bem-method/contributors","subscribers_url":"https://api.github.com/repos/bem/bem-method/subscribers","subscription_url":"https://api.github.com/repos/bem/bem-method/subscription","commits_url":"https://api.github.com/repos/bem/bem-method/commits{/sha}","git_commits_url":"https://api.github.com/repos/bem/bem-method/git/commits{/sha}","comments_url":"https://api.github.com/repos/bem/bem-method/comments{/number}","issue_comment_url":"https://api.github.com/repos/bem/bem-method/issues/comments{/number}","contents_url":"https://api.github.com/repos/bem/bem-method/contents/{+path}","compare_url":"https://api.github.com/repos/bem/bem-method/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bem/bem-method/merges","archive_url":"https://api.github.com/repos/bem/bem-method/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bem/bem-method/downloads","issues_url":"https://api.github.com/repos/bem/bem-method/issues{/number}","pulls_url":"https://api.github.com/repos/bem/bem-method/pulls{/number}","milestones_url":"https://api.github.com/repos/bem/bem-method/milestones{/number}","notifications_url":"https://api.github.com/repos/bem/bem-method/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bem/bem-method/labels{/name}","releases_url":"https://api.github.com/repos/bem/bem-method/releases{/id}","created_at":"2010-08-06T06:52:01Z","updated_at":"2015-10-31T12:08:27Z","pushed_at":"2015-11-06T10:06:20Z","git_url":"git://github.com/bem/bem-method.git","ssh_url":"git@github.com:bem/bem-method.git","clone_url":"https://github.com/bem/bem-method.git","svn_url":"https://github.com/bem/bem-method","homepage":"http://bem.info","size":29450,"stargazers_count":229,"watchers_count":229,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":67,"mirror_url":null,"open_issues_count":24,"forks":67,"open_issues":24,"watchers":229,"default_branch":"bem-info-data"}},"base":{"label":"bem:bem-info-data","ref":"bem-info-data","sha":"22ebe8bbe6864bfd31d6c2773468dee471b42662","user":{"login":"bem","id":223412,"avatar_url":"https://avatars.githubusercontent.com/u/223412?v=3","gravatar_id":"","url":"https://api.github.com/users/bem","html_url":"https://github.com/bem","followers_url":"https://api.github.com/users/bem/followers","following_url":"https://api.github.com/users/bem/following{/other_user}","gists_url":"https://api.github.com/users/bem/gists{/gist_id}","starred_url":"https://api.github.com/users/bem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem/subscriptions","organizations_url":"https://api.github.com/users/bem/orgs","repos_url":"https://api.github.com/users/bem/repos","events_url":"https://api.github.com/users/bem/events{/privacy}","received_events_url":"https://api.github.com/users/bem/received_events","type":"Organization","site_admin":false},"repo":{"id":820900,"name":"bem-method","full_name":"bem/bem-method","owner":{"login":"bem","id":223412,"avatar_url":"https://avatars.githubusercontent.com/u/223412?v=3","gravatar_id":"","url":"https://api.github.com/users/bem","html_url":"https://github.com/bem","followers_url":"https://api.github.com/users/bem/followers","following_url":"https://api.github.com/users/bem/following{/other_user}","gists_url":"https://api.github.com/users/bem/gists{/gist_id}","starred_url":"https://api.github.com/users/bem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem/subscriptions","organizations_url":"https://api.github.com/users/bem/orgs","repos_url":"https://api.github.com/users/bem/repos","events_url":"https://api.github.com/users/bem/events{/privacy}","received_events_url":"https://api.github.com/users/bem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bem/bem-method","description":"BEM — a methodology how to develop web projects applicable for any technology","fork":false,"url":"https://api.github.com/repos/bem/bem-method","forks_url":"https://api.github.com/repos/bem/bem-method/forks","keys_url":"https://api.github.com/repos/bem/bem-method/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bem/bem-method/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bem/bem-method/teams","hooks_url":"https://api.github.com/repos/bem/bem-method/hooks","issue_events_url":"https://api.github.com/repos/bem/bem-method/issues/events{/number}","events_url":"https://api.github.com/repos/bem/bem-method/events","assignees_url":"https://api.github.com/repos/bem/bem-method/assignees{/user}","branches_url":"https://api.github.com/repos/bem/bem-method/branches{/branch}","tags_url":"https://api.github.com/repos/bem/bem-method/tags","blobs_url":"https://api.github.com/repos/bem/bem-method/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bem/bem-method/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bem/bem-method/git/refs{/sha}","trees_url":"https://api.github.com/repos/bem/bem-method/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bem/bem-method/statuses/{sha}","languages_url":"https://api.github.com/repos/bem/bem-method/languages","stargazers_url":"https://api.github.com/repos/bem/bem-method/stargazers","contributors_url":"https://api.github.com/repos/bem/bem-method/contributors","subscribers_url":"https://api.github.com/repos/bem/bem-method/subscribers","subscription_url":"https://api.github.com/repos/bem/bem-method/subscription","commits_url":"https://api.github.com/repos/bem/bem-method/commits{/sha}","git_commits_url":"https://api.github.com/repos/bem/bem-method/git/commits{/sha}","comments_url":"https://api.github.com/repos/bem/bem-method/comments{/number}","issue_comment_url":"https://api.github.com/repos/bem/bem-method/issues/comments{/number}","contents_url":"https://api.github.com/repos/bem/bem-method/contents/{+path}","compare_url":"https://api.github.com/repos/bem/bem-method/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bem/bem-method/merges","archive_url":"https://api.github.com/repos/bem/bem-method/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bem/bem-method/downloads","issues_url":"https://api.github.com/repos/bem/bem-method/issues{/number}","pulls_url":"https://api.github.com/repos/bem/bem-method/pulls{/number}","milestones_url":"https://api.github.com/repos/bem/bem-method/milestones{/number}","notifications_url":"https://api.github.com/repos/bem/bem-method/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bem/bem-method/labels{/name}","releases_url":"https://api.github.com/repos/bem/bem-method/releases{/id}","created_at":"2010-08-06T06:52:01Z","updated_at":"2015-10-31T12:08:27Z","pushed_at":"2015-11-06T10:06:20Z","git_url":"git://github.com/bem/bem-method.git","ssh_url":"git@github.com:bem/bem-method.git","clone_url":"https://github.com/bem/bem-method.git","svn_url":"https://github.com/bem/bem-method","homepage":"http://bem.info","size":29450,"stargazers_count":229,"watchers_count":229,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":67,"mirror_url":null,"open_issues_count":24,"forks":67,"open_issues":24,"watchers":229,"default_branch":"bem-info-data"}},"_links":{"self":{"href":"https://api.github.com/repos/bem/bem-method/pulls/338"},"html":{"href":"https://github.com/bem/bem-method/pull/338"},"issue":{"href":"https://api.github.com/repos/bem/bem-method/issues/338"},"comments":{"href":"https://api.github.com/repos/bem/bem-method/issues/338/comments"},"review_comments":{"href":"https://api.github.com/repos/bem/bem-method/pulls/338/comments"},"review_comment":{"href":"https://api.github.com/repos/bem/bem-method/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bem/bem-method/pulls/338/commits"},"statuses":{"href":"https://api.github.com/repos/bem/bem-method/statuses/878e3822c5df8688910ab0311d7ebcf54601bfc5"}}}}