{"action":"opened","number":4843,"pull_request":{"url":"https://api.github.com/repos/laravel/laravel/pulls/4843","id":227937827,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3OTM3ODI3","html_url":"https://github.com/laravel/laravel/pull/4843","diff_url":"https://github.com/laravel/laravel/pull/4843.diff","patch_url":"https://github.com/laravel/laravel/pull/4843.patch","issue_url":"https://api.github.com/repos/laravel/laravel/issues/4843","number":4843,"state":"open","locked":false,"title":"Auto register Vue components","user":{"login":"reinink","id":882133,"node_id":"MDQ6VXNlcjg4MjEzMw==","avatar_url":"https://avatars0.githubusercontent.com/u/882133?v=4","gravatar_id":"","url":"https://api.github.com/users/reinink","html_url":"https://github.com/reinink","followers_url":"https://api.github.com/users/reinink/followers","following_url":"https://api.github.com/users/reinink/following{/other_user}","gists_url":"https://api.github.com/users/reinink/gists{/gist_id}","starred_url":"https://api.github.com/users/reinink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinink/subscriptions","organizations_url":"https://api.github.com/users/reinink/orgs","repos_url":"https://api.github.com/users/reinink/repos","events_url":"https://api.github.com/users/reinink/events{/privacy}","received_events_url":"https://api.github.com/users/reinink/received_events","type":"User","site_admin":false},"body":"Not sure if this is too magical, but Webpack has a feature called [require.context](https://webpack.js.org/guides/dependency-management/#require-context), which allows you to traverse a directory. Using this, we can automatically register all the Vue components in the `/js` directory. This happens at build time, so there is no performance implications.\r\n\r\nNote, this will register Vue components in sub folders as well, so it's the developer's responsibility to avoid naming collisions, since the folder name isn't included in the component name (although it could be added if they wanted). I don't see this as an issue, in fact I like it since it allows organization of Vue files into folders, but it's good to be aware of.\r\n\r\nExamples:\r\n\r\n- `/js/components/ExampleComponent.vue` becomes `<example-component></example-component>`\r\n- `/js/components/Autocomplete.vue` becomes `<autocomplete></autocomplete>`\r\n- `/js/pages/CreateUser.vue` becomes `<create-user></create-user>`\r\n- `/js/Layout.vue` becomes `<layout></layout>`","created_at":"2018-11-02T13:33:19Z","updated_at":"2018-11-02T13:33:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/laravel/laravel/pulls/4843/commits","review_comments_url":"https://api.github.com/repos/laravel/laravel/pulls/4843/comments","review_comment_url":"https://api.github.com/repos/laravel/laravel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/laravel/laravel/issues/4843/comments","statuses_url":"https://api.github.com/repos/laravel/laravel/statuses/4dadb9309d235de5e7d896a11fc9a22505dc64c0","head":{"label":"reinink:patch-1","ref":"patch-1","sha":"4dadb9309d235de5e7d896a11fc9a22505dc64c0","user":{"login":"reinink","id":882133,"node_id":"MDQ6VXNlcjg4MjEzMw==","avatar_url":"https://avatars0.githubusercontent.com/u/882133?v=4","gravatar_id":"","url":"https://api.github.com/users/reinink","html_url":"https://github.com/reinink","followers_url":"https://api.github.com/users/reinink/followers","following_url":"https://api.github.com/users/reinink/following{/other_user}","gists_url":"https://api.github.com/users/reinink/gists{/gist_id}","starred_url":"https://api.github.com/users/reinink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinink/subscriptions","organizations_url":"https://api.github.com/users/reinink/orgs","repos_url":"https://api.github.com/users/reinink/repos","events_url":"https://api.github.com/users/reinink/events{/privacy}","received_events_url":"https://api.github.com/users/reinink/received_events","type":"User","site_admin":false},"repo":{"id":155866867,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU4NjY4Njc=","name":"laravel","full_name":"reinink/laravel","private":false,"owner":{"login":"reinink","id":882133,"node_id":"MDQ6VXNlcjg4MjEzMw==","avatar_url":"https://avatars0.githubusercontent.com/u/882133?v=4","gravatar_id":"","url":"https://api.github.com/users/reinink","html_url":"https://github.com/reinink","followers_url":"https://api.github.com/users/reinink/followers","following_url":"https://api.github.com/users/reinink/following{/other_user}","gists_url":"https://api.github.com/users/reinink/gists{/gist_id}","starred_url":"https://api.github.com/users/reinink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinink/subscriptions","organizations_url":"https://api.github.com/users/reinink/orgs","repos_url":"https://api.github.com/users/reinink/repos","events_url":"https://api.github.com/users/reinink/events{/privacy}","received_events_url":"https://api.github.com/users/reinink/received_events","type":"User","site_admin":false},"html_url":"https://github.com/reinink/laravel","description":"A PHP framework for web artisans","fork":true,"url":"https://api.github.com/repos/reinink/laravel","forks_url":"https://api.github.com/repos/reinink/laravel/forks","keys_url":"https://api.github.com/repos/reinink/laravel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reinink/laravel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reinink/laravel/teams","hooks_url":"https://api.github.com/repos/reinink/laravel/hooks","issue_events_url":"https://api.github.com/repos/reinink/laravel/issues/events{/number}","events_url":"https://api.github.com/repos/reinink/laravel/events","assignees_url":"https://api.github.com/repos/reinink/laravel/assignees{/user}","branches_url":"https://api.github.com/repos/reinink/laravel/branches{/branch}","tags_url":"https://api.github.com/repos/reinink/laravel/tags","blobs_url":"https://api.github.com/repos/reinink/laravel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reinink/laravel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reinink/laravel/git/refs{/sha}","trees_url":"https://api.github.com/repos/reinink/laravel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reinink/laravel/statuses/{sha}","languages_url":"https://api.github.com/repos/reinink/laravel/languages","stargazers_url":"https://api.github.com/repos/reinink/laravel/stargazers","contributors_url":"https://api.github.com/repos/reinink/laravel/contributors","subscribers_url":"https://api.github.com/repos/reinink/laravel/subscribers","subscription_url":"https://api.github.com/repos/reinink/laravel/subscription","commits_url":"https://api.github.com/repos/reinink/laravel/commits{/sha}","git_commits_url":"https://api.github.com/repos/reinink/laravel/git/commits{/sha}","comments_url":"https://api.github.com/repos/reinink/laravel/comments{/number}","issue_comment_url":"https://api.github.com/repos/reinink/laravel/issues/comments{/number}","contents_url":"https://api.github.com/repos/reinink/laravel/contents/{+path}","compare_url":"https://api.github.com/repos/reinink/laravel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reinink/laravel/merges","archive_url":"https://api.github.com/repos/reinink/laravel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reinink/laravel/downloads","issues_url":"https://api.github.com/repos/reinink/laravel/issues{/number}","pulls_url":"https://api.github.com/repos/reinink/laravel/pulls{/number}","milestones_url":"https://api.github.com/repos/reinink/laravel/milestones{/number}","notifications_url":"https://api.github.com/repos/reinink/laravel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reinink/laravel/labels{/name}","releases_url":"https://api.github.com/repos/reinink/laravel/releases{/id}","deployments_url":"https://api.github.com/repos/reinink/laravel/deployments","created_at":"2018-11-02T13:04:00Z","updated_at":"2018-11-02T13:04:04Z","pushed_at":"2018-11-02T13:25:17Z","git_url":"git://github.com/reinink/laravel.git","ssh_url":"git@github.com:reinink/laravel.git","clone_url":"https://github.com/reinink/laravel.git","svn_url":"https://github.com/reinink/laravel","homepage":"https://laravel.com","size":9249,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"laravel:master","ref":"master","sha":"5d7936eeb079ed8b403da422eb24783cdb9732fc","user":{"login":"laravel","id":958072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1ODA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/958072?v=4","gravatar_id":"","url":"https://api.github.com/users/laravel","html_url":"https://github.com/laravel","followers_url":"https://api.github.com/users/laravel/followers","following_url":"https://api.github.com/users/laravel/following{/other_user}","gists_url":"https://api.github.com/users/laravel/gists{/gist_id}","starred_url":"https://api.github.com/users/laravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laravel/subscriptions","organizations_url":"https://api.github.com/users/laravel/orgs","repos_url":"https://api.github.com/users/laravel/repos","events_url":"https://api.github.com/users/laravel/events{/privacy}","received_events_url":"https://api.github.com/users/laravel/received_events","type":"Organization","site_admin":false},"repo":{"id":1863329,"node_id":"MDEwOlJlcG9zaXRvcnkxODYzMzI5","name":"laravel","full_name":"laravel/laravel","private":false,"owner":{"login":"laravel","id":958072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1ODA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/958072?v=4","gravatar_id":"","url":"https://api.github.com/users/laravel","html_url":"https://github.com/laravel","followers_url":"https://api.github.com/users/laravel/followers","following_url":"https://api.github.com/users/laravel/following{/other_user}","gists_url":"https://api.github.com/users/laravel/gists{/gist_id}","starred_url":"https://api.github.com/users/laravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laravel/subscriptions","organizations_url":"https://api.github.com/users/laravel/orgs","repos_url":"https://api.github.com/users/laravel/repos","events_url":"https://api.github.com/users/laravel/events{/privacy}","received_events_url":"https://api.github.com/users/laravel/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/laravel/laravel","description":"A PHP framework for web artisans","fork":false,"url":"https://api.github.com/repos/laravel/laravel","forks_url":"https://api.github.com/repos/laravel/laravel/forks","keys_url":"https://api.github.com/repos/laravel/laravel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laravel/laravel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laravel/laravel/teams","hooks_url":"https://api.github.com/repos/laravel/laravel/hooks","issue_events_url":"https://api.github.com/repos/laravel/laravel/issues/events{/number}","events_url":"https://api.github.com/repos/laravel/laravel/events","assignees_url":"https://api.github.com/repos/laravel/laravel/assignees{/user}","branches_url":"https://api.github.com/repos/laravel/laravel/branches{/branch}","tags_url":"https://api.github.com/repos/laravel/laravel/tags","blobs_url":"https://api.github.com/repos/laravel/laravel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laravel/laravel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laravel/laravel/git/refs{/sha}","trees_url":"https://api.github.com/repos/laravel/laravel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laravel/laravel/statuses/{sha}","languages_url":"https://api.github.com/repos/laravel/laravel/languages","stargazers_url":"https://api.github.com/repos/laravel/laravel/stargazers","contributors_url":"https://api.github.com/repos/laravel/laravel/contributors","subscribers_url":"https://api.github.com/repos/laravel/laravel/subscribers","subscription_url":"https://api.github.com/repos/laravel/laravel/subscription","commits_url":"https://api.github.com/repos/laravel/laravel/commits{/sha}","git_commits_url":"https://api.github.com/repos/laravel/laravel/git/commits{/sha}","comments_url":"https://api.github.com/repos/laravel/laravel/comments{/number}","issue_comment_url":"https://api.github.com/repos/laravel/laravel/issues/comments{/number}","contents_url":"https://api.github.com/repos/laravel/laravel/contents/{+path}","compare_url":"https://api.github.com/repos/laravel/laravel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laravel/laravel/merges","archive_url":"https://api.github.com/repos/laravel/laravel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laravel/laravel/downloads","issues_url":"https://api.github.com/repos/laravel/laravel/issues{/number}","pulls_url":"https://api.github.com/repos/laravel/laravel/pulls{/number}","milestones_url":"https://api.github.com/repos/laravel/laravel/milestones{/number}","notifications_url":"https://api.github.com/repos/laravel/laravel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laravel/laravel/labels{/name}","releases_url":"https://api.github.com/repos/laravel/laravel/releases{/id}","deployments_url":"https://api.github.com/repos/laravel/laravel/deployments","created_at":"2011-06-08T03:06:08Z","updated_at":"2018-11-02T11:54:42Z","pushed_at":"2018-10-31T13:58:48Z","git_url":"git://github.com/laravel/laravel.git","ssh_url":"git@github.com:laravel/laravel.git","clone_url":"https://github.com/laravel/laravel.git","svn_url":"https://github.com/laravel/laravel","homepage":"https://laravel.com","size":9249,"stargazers_count":46853,"watchers_count":46853,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14523,"mirror_url":null,"archived":false,"open_issues_count":28,"license":null,"forks":14523,"open_issues":28,"watchers":46853,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/laravel/laravel/pulls/4843"},"html":{"href":"https://github.com/laravel/laravel/pull/4843"},"issue":{"href":"https://api.github.com/repos/laravel/laravel/issues/4843"},"comments":{"href":"https://api.github.com/repos/laravel/laravel/issues/4843/comments"},"review_comments":{"href":"https://api.github.com/repos/laravel/laravel/pulls/4843/comments"},"review_comment":{"href":"https://api.github.com/repos/laravel/laravel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/laravel/laravel/pulls/4843/commits"},"statuses":{"href":"https://api.github.com/repos/laravel/laravel/statuses/4dadb9309d235de5e7d896a11fc9a22505dc64c0"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":5,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"reinink"}}