{"action":"created","comment":{"url":"https://api.github.com/repos/bem/bem-method/pulls/comments/33595223","id":33595223,"diff_hunk":"@@ -0,0 +1,190 @@\n+# Организация файловой системы БЭМ-проекта\n+\n+Методология БЭМ использует компонентный подход, который определяет принципы организации файловой системы БЭМ-проектов. В БЭМ не только интерфейс делится на независимые компоненты — блоки, но и реализация блоков делятся на независимые части — файлы.\n+\n+На этой странице вы найдете:\n+\n+* [Принципы организации файловой системы](#principles)\n+* [Пример файловой системы БЭМ-проекта](#bem-file-system)\n+* [Примеры использования уровней переопределения](#level)\n+\n+<a name=\"principles\"></a>\n+## Принципы организации файловой системы БЭМ-проекта\n+\n+В БЭМ-проекте код разделяется на мелкие части для удобства работы с отдельными блоками. Перед отправкой в браузер файлы собираются и оптимизируются. Таким образом мы разграничиваем код, с которым работают люди, и код, который отдается в браузер.\n+\n+* [Реализация блока разделяется на отдельные файлы](#tech-files)\n+* [Опциональные элементы и модификаторы выносятся в отдельные файлы](#optional)\n+* [Файлы объединяются по смыслу, а не по типу](#comb)\n+* [Проект разделяется на уровни переопределения](#project-levels)\n+\n+<a name=\"tech-files\"></a>\n+### Реализация блока разделяется на отдельные файлы\n+\n+Набор файлов (например, `input.css`, `input.js`) зависит от [технологий](../definitions/definitions.ru.md#techs), входящих в реализацию блока.\n+\n+*Зачем?*\n+\n+* **Улучшение навигации по проекту.**<br>\n+Структура проекта построена по одинаковым принципам, а имена блоков уникальны. Это позволяет быстро ориентироваться разработчикам в разных частях проекта и находить нужные файлы.\n+* **Упрощение переноса блоков между проектами.**<br>\n+Реализация блока разделена по отдельным файлам. При переносе блока из проекта в проект достаточно скопировать нужные файлы или директории.\n+\n+<a name=\"optional\"></a>\n+### Опциональные элементы и модификаторы выносятся в отдельные файлы\n+\n+*Зачем?*\n+\n+* **Подключение только нужной реалиации блока**<br>\n+В сборку подключаются только файлы, действительно необходимые для данной реализации блока.\n+\n+<a name=\"comb\"></a>\n+### Файлы объединяются по смыслу, а не по типу\n+\n+Файлы, относящиеся к блоку, сгруппированы с помощью общих [правил именования](../naming/naming.ru.md). Для удобства работы они могут быть объединены в директории блоков.\n+\n+*Зачем?*\n+\n+* **Подключение в проект только необходимых блоков.**<br>\n+Блоки реализованы независимо и представляют собой набор [файлов технологий](#tech-files). Это позволяет настраивать сборку так, чтобы в проект попадали только нужные блоки.\n+\n+<a name=\"project-levels\"></a>\n+### Проект разделяется на уровни переопределения\n+\n+Конечная реализация блока может быть разделена по [уровням переопределения](#level).\n+\n+*Зачем?*\n+\n+* Отсутствие дублирования кода.\n+* Переопределение и доопределение блоков готовых библиотек.\n+* Обновление подключенныех в проект библиотек.\n+\n+<a name=\"bem-file-system\"></a>\n+## Организация файловой системы БЭМ-проекта\n+\n+Блоку соответствует директория в файловой системе. Имена блока и его директории совпадают.","path":"method/filesystem/filesystem1.ru.md","position":65,"original_position":65,"commit_id":"732be21d497a765b318c6ae00e7aa877d883f428","original_commit_id":"732be21d497a765b318c6ae00e7aa877d883f428","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":"> Имена блока и его директории совпадают.\r\nНе очень удачная формулировка, как будто они муж и жена. Лучше более описательно: Имя директории, в которой находятся файлы блока, совпадает с именем блока.","created_at":"2015-06-30T16:50:30Z","updated_at":"2015-06-30T16:50:30Z","html_url":"https://github.com/bem/bem-method/pull/265#discussion_r33595223","pull_request_url":"https://api.github.com/repos/bem/bem-method/pulls/265","_links":{"self":{"href":"https://api.github.com/repos/bem/bem-method/pulls/comments/33595223"},"html":{"href":"https://github.com/bem/bem-method/pull/265#discussion_r33595223"},"pull_request":{"href":"https://api.github.com/repos/bem/bem-method/pulls/265"}}},"pull_request":{"url":"https://api.github.com/repos/bem/bem-method/pulls/265","id":37996456,"html_url":"https://github.com/bem/bem-method/pull/265","diff_url":"https://github.com/bem/bem-method/pull/265.diff","patch_url":"https://github.com/bem/bem-method/pull/265.patch","issue_url":"https://api.github.com/repos/bem/bem-method/issues/265","number":265,"state":"open","locked":false,"title":"File system: documentation","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-06-18T11:28:12Z","updated_at":"2015-06-30T16:50:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"927c73c95dac3b12390de0cb7c6a04640f6d01e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bem/bem-method/pulls/265/commits","review_comments_url":"https://api.github.com/repos/bem/bem-method/pulls/265/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/265/comments","statuses_url":"https://api.github.com/repos/bem/bem-method/statuses/732be21d497a765b318c6ae00e7aa877d883f428","head":{"label":"bem:bem-file-system","ref":"bem-file-system","sha":"732be21d497a765b318c6ae00e7aa877d883f428","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-06-30T08:52:30Z","pushed_at":"2015-06-30T14:29:03Z","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":25094,"stargazers_count":204,"watchers_count":204,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":61,"mirror_url":null,"open_issues_count":40,"forks":61,"open_issues":40,"watchers":204,"default_branch":"bem-info-data"}},"base":{"label":"bem:bem-info-data","ref":"bem-info-data","sha":"01f2988ac94775470778d0f106a38f3d2add6f3d","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-06-30T08:52:30Z","pushed_at":"2015-06-30T14:29:03Z","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":25094,"stargazers_count":204,"watchers_count":204,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":61,"mirror_url":null,"open_issues_count":40,"forks":61,"open_issues":40,"watchers":204,"default_branch":"bem-info-data"}},"_links":{"self":{"href":"https://api.github.com/repos/bem/bem-method/pulls/265"},"html":{"href":"https://github.com/bem/bem-method/pull/265"},"issue":{"href":"https://api.github.com/repos/bem/bem-method/issues/265"},"comments":{"href":"https://api.github.com/repos/bem/bem-method/issues/265/comments"},"review_comments":{"href":"https://api.github.com/repos/bem/bem-method/pulls/265/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/265/commits"},"statuses":{"href":"https://api.github.com/repos/bem/bem-method/statuses/732be21d497a765b318c6ae00e7aa877d883f428"}}}}