{"action":"created","comment":{"url":"https://api.github.com/repos/2gis/mapsapi/pulls/comments/63647578","id":63647578,"diff_hunk":"@@ -10,18 +11,27 @@\n   \"scripts\": {\n     \"start\": \"node app\",\n     \"test\": \"gulp test\",\n-    \"lint\": \"gulp lint\"\n+    \"lint\": \"gulp lint\",\n+    \"pub\": \"gulp clean && gulp build --npm && npm publish\"","path":"package.json","position":16,"original_position":16,"commit_id":"4556cba286734aeea3eb18a39e6e094b1984ed79","original_commit_id":"4556cba286734aeea3eb18a39e6e094b1984ed79","user":{"login":"RLRR","id":4540062,"avatar_url":"https://avatars.githubusercontent.com/u/4540062?v=3","gravatar_id":"","url":"https://api.github.com/users/RLRR","html_url":"https://github.com/RLRR","followers_url":"https://api.github.com/users/RLRR/followers","following_url":"https://api.github.com/users/RLRR/following{/other_user}","gists_url":"https://api.github.com/users/RLRR/gists{/gist_id}","starred_url":"https://api.github.com/users/RLRR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RLRR/subscriptions","organizations_url":"https://api.github.com/users/RLRR/orgs","repos_url":"https://api.github.com/users/RLRR/repos","events_url":"https://api.github.com/users/RLRR/events{/privacy}","received_events_url":"https://api.github.com/users/RLRR/received_events","type":"User","site_admin":false},"body":"Я смотрел на `2gl`, там Стив почему-то сделал именно так. Но вообще можно попробовать","created_at":"2016-05-18T05:38:29Z","updated_at":"2016-05-18T05:38:29Z","html_url":"https://github.com/2gis/mapsapi/pull/352#discussion_r63647578","pull_request_url":"https://api.github.com/repos/2gis/mapsapi/pulls/352","_links":{"self":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/comments/63647578"},"html":{"href":"https://github.com/2gis/mapsapi/pull/352#discussion_r63647578"},"pull_request":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/352"}}},"pull_request":{"url":"https://api.github.com/repos/2gis/mapsapi/pulls/352","id":70307720,"html_url":"https://github.com/2gis/mapsapi/pull/352","diff_url":"https://github.com/2gis/mapsapi/pull/352.diff","patch_url":"https://github.com/2gis/mapsapi/pull/352.patch","issue_url":"https://api.github.com/repos/2gis/mapsapi/issues/352","number":352,"state":"open","locked":false,"title":"TILES-529: make 2gis maps npm compatible","user":{"login":"RLRR","id":4540062,"avatar_url":"https://avatars.githubusercontent.com/u/4540062?v=3","gravatar_id":"","url":"https://api.github.com/users/RLRR","html_url":"https://github.com/RLRR","followers_url":"https://api.github.com/users/RLRR/followers","following_url":"https://api.github.com/users/RLRR/following{/other_user}","gists_url":"https://api.github.com/users/RLRR/gists{/gist_id}","starred_url":"https://api.github.com/users/RLRR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RLRR/subscriptions","organizations_url":"https://api.github.com/users/RLRR/orgs","repos_url":"https://api.github.com/users/RLRR/repos","events_url":"https://api.github.com/users/RLRR/events{/privacy}","received_events_url":"https://api.github.com/users/RLRR/received_events","type":"User","site_admin":false},"body":"Теперь для сборки JS используется browserify. Этап browserify-сборки выполняется после обычного конкатенирования скриптов. Другими словами, сборка происходит в два шага:\r\n\r\n1. Конкатенируем наши файлы как раньше\r\n2. Собираем из результата шага 1 browserify-бандл, в который подтягиваются внешние зависимости (`leaflet`, `dust`, `baron` и т. д).\r\n\r\nПолученный бандл можно просто добавлять на страничку как раньше (в глобальную область запишется `DG`), а можно реквайрить: `const DG = require('2gis-maps');`\r\n\r\n*Особенности:*\r\n\r\n1. Раньше тестовая сборка не конкатериновала JS вообще; теперь это невозможно, поэтому код для тестов теперь тоже конкатенируется и заворачивается в бандл.\r\n2. Из-за того, что тестовые и обычные сборки стали более похожими, получилось немного порефакторить сборку и выпилить избыточные таски.\r\n3. Сборка для npm выполняется командой `gulp build --npm`. В этом режиме отключается локальный конфиг, а в поле `protocol` записывается `https:`. Таким образом, у чуваков, которые будут использовать API карт через npm, все внешние запросы будут идти на боевые урлы всегда с протоколом https.","created_at":"2016-05-17T06:54:56Z","updated_at":"2016-05-18T05:38:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"000c21c53bb01cac0d4b427d13473789390bcae6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/2gis/mapsapi/pulls/352/commits","review_comments_url":"https://api.github.com/repos/2gis/mapsapi/pulls/352/comments","review_comment_url":"https://api.github.com/repos/2gis/mapsapi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/2gis/mapsapi/issues/352/comments","statuses_url":"https://api.github.com/repos/2gis/mapsapi/statuses/4556cba286734aeea3eb18a39e6e094b1984ed79","head":{"label":"2gis:TILES-529-npm","ref":"TILES-529-npm","sha":"4556cba286734aeea3eb18a39e6e094b1984ed79","user":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"repo":{"id":8050444,"name":"mapsapi","full_name":"2gis/mapsapi","owner":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2gis/mapsapi","description":"Карты 2ГИС — это точные данные обо всех объектах города, включая новостройки, с детализацией до заборов и внутриквартальных проездов.","fork":false,"url":"https://api.github.com/repos/2gis/mapsapi","forks_url":"https://api.github.com/repos/2gis/mapsapi/forks","keys_url":"https://api.github.com/repos/2gis/mapsapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2gis/mapsapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2gis/mapsapi/teams","hooks_url":"https://api.github.com/repos/2gis/mapsapi/hooks","issue_events_url":"https://api.github.com/repos/2gis/mapsapi/issues/events{/number}","events_url":"https://api.github.com/repos/2gis/mapsapi/events","assignees_url":"https://api.github.com/repos/2gis/mapsapi/assignees{/user}","branches_url":"https://api.github.com/repos/2gis/mapsapi/branches{/branch}","tags_url":"https://api.github.com/repos/2gis/mapsapi/tags","blobs_url":"https://api.github.com/repos/2gis/mapsapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2gis/mapsapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2gis/mapsapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/2gis/mapsapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2gis/mapsapi/statuses/{sha}","languages_url":"https://api.github.com/repos/2gis/mapsapi/languages","stargazers_url":"https://api.github.com/repos/2gis/mapsapi/stargazers","contributors_url":"https://api.github.com/repos/2gis/mapsapi/contributors","subscribers_url":"https://api.github.com/repos/2gis/mapsapi/subscribers","subscription_url":"https://api.github.com/repos/2gis/mapsapi/subscription","commits_url":"https://api.github.com/repos/2gis/mapsapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/2gis/mapsapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/2gis/mapsapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/2gis/mapsapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/2gis/mapsapi/contents/{+path}","compare_url":"https://api.github.com/repos/2gis/mapsapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2gis/mapsapi/merges","archive_url":"https://api.github.com/repos/2gis/mapsapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2gis/mapsapi/downloads","issues_url":"https://api.github.com/repos/2gis/mapsapi/issues{/number}","pulls_url":"https://api.github.com/repos/2gis/mapsapi/pulls{/number}","milestones_url":"https://api.github.com/repos/2gis/mapsapi/milestones{/number}","notifications_url":"https://api.github.com/repos/2gis/mapsapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2gis/mapsapi/labels{/name}","releases_url":"https://api.github.com/repos/2gis/mapsapi/releases{/id}","deployments_url":"https://api.github.com/repos/2gis/mapsapi/deployments","created_at":"2013-02-06T11:59:11Z","updated_at":"2016-05-12T09:13:52Z","pushed_at":"2016-05-17T11:26:38Z","git_url":"git://github.com/2gis/mapsapi.git","ssh_url":"git@github.com:2gis/mapsapi.git","clone_url":"https://github.com/2gis/mapsapi.git","svn_url":"https://github.com/2gis/mapsapi","homepage":"","size":16693,"stargazers_count":78,"watchers_count":78,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":34,"forks":2,"open_issues":34,"watchers":78,"default_branch":"master"}},"base":{"label":"2gis:master","ref":"master","sha":"20b76ef8a8c8b476f1aa8a621fcae3b7910f3927","user":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"repo":{"id":8050444,"name":"mapsapi","full_name":"2gis/mapsapi","owner":{"login":"2gis","id":1481435,"avatar_url":"https://avatars.githubusercontent.com/u/1481435?v=3","gravatar_id":"","url":"https://api.github.com/users/2gis","html_url":"https://github.com/2gis","followers_url":"https://api.github.com/users/2gis/followers","following_url":"https://api.github.com/users/2gis/following{/other_user}","gists_url":"https://api.github.com/users/2gis/gists{/gist_id}","starred_url":"https://api.github.com/users/2gis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2gis/subscriptions","organizations_url":"https://api.github.com/users/2gis/orgs","repos_url":"https://api.github.com/users/2gis/repos","events_url":"https://api.github.com/users/2gis/events{/privacy}","received_events_url":"https://api.github.com/users/2gis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2gis/mapsapi","description":"Карты 2ГИС — это точные данные обо всех объектах города, включая новостройки, с детализацией до заборов и внутриквартальных проездов.","fork":false,"url":"https://api.github.com/repos/2gis/mapsapi","forks_url":"https://api.github.com/repos/2gis/mapsapi/forks","keys_url":"https://api.github.com/repos/2gis/mapsapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2gis/mapsapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2gis/mapsapi/teams","hooks_url":"https://api.github.com/repos/2gis/mapsapi/hooks","issue_events_url":"https://api.github.com/repos/2gis/mapsapi/issues/events{/number}","events_url":"https://api.github.com/repos/2gis/mapsapi/events","assignees_url":"https://api.github.com/repos/2gis/mapsapi/assignees{/user}","branches_url":"https://api.github.com/repos/2gis/mapsapi/branches{/branch}","tags_url":"https://api.github.com/repos/2gis/mapsapi/tags","blobs_url":"https://api.github.com/repos/2gis/mapsapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2gis/mapsapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2gis/mapsapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/2gis/mapsapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2gis/mapsapi/statuses/{sha}","languages_url":"https://api.github.com/repos/2gis/mapsapi/languages","stargazers_url":"https://api.github.com/repos/2gis/mapsapi/stargazers","contributors_url":"https://api.github.com/repos/2gis/mapsapi/contributors","subscribers_url":"https://api.github.com/repos/2gis/mapsapi/subscribers","subscription_url":"https://api.github.com/repos/2gis/mapsapi/subscription","commits_url":"https://api.github.com/repos/2gis/mapsapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/2gis/mapsapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/2gis/mapsapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/2gis/mapsapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/2gis/mapsapi/contents/{+path}","compare_url":"https://api.github.com/repos/2gis/mapsapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2gis/mapsapi/merges","archive_url":"https://api.github.com/repos/2gis/mapsapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2gis/mapsapi/downloads","issues_url":"https://api.github.com/repos/2gis/mapsapi/issues{/number}","pulls_url":"https://api.github.com/repos/2gis/mapsapi/pulls{/number}","milestones_url":"https://api.github.com/repos/2gis/mapsapi/milestones{/number}","notifications_url":"https://api.github.com/repos/2gis/mapsapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2gis/mapsapi/labels{/name}","releases_url":"https://api.github.com/repos/2gis/mapsapi/releases{/id}","deployments_url":"https://api.github.com/repos/2gis/mapsapi/deployments","created_at":"2013-02-06T11:59:11Z","updated_at":"2016-05-12T09:13:52Z","pushed_at":"2016-05-17T11:26:38Z","git_url":"git://github.com/2gis/mapsapi.git","ssh_url":"git@github.com:2gis/mapsapi.git","clone_url":"https://github.com/2gis/mapsapi.git","svn_url":"https://github.com/2gis/mapsapi","homepage":"","size":16693,"stargazers_count":78,"watchers_count":78,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":34,"forks":2,"open_issues":34,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/352"},"html":{"href":"https://github.com/2gis/mapsapi/pull/352"},"issue":{"href":"https://api.github.com/repos/2gis/mapsapi/issues/352"},"comments":{"href":"https://api.github.com/repos/2gis/mapsapi/issues/352/comments"},"review_comments":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/352/comments"},"review_comment":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/2gis/mapsapi/pulls/352/commits"},"statuses":{"href":"https://api.github.com/repos/2gis/mapsapi/statuses/4556cba286734aeea3eb18a39e6e094b1984ed79"}}}}