{"action":"created","issue":{"url":"https://api.github.com/repos/sapegin/react-styleguidist/issues/237","repository_url":"https://api.github.com/repos/sapegin/react-styleguidist","labels_url":"https://api.github.com/repos/sapegin/react-styleguidist/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/sapegin/react-styleguidist/issues/237/comments","events_url":"https://api.github.com/repos/sapegin/react-styleguidist/issues/237/events","html_url":"https://github.com/sapegin/react-styleguidist/pull/237","id":190141561,"number":237,"title":"Support hot reloading for new example files","user":{"login":"aaronjensen","id":8588,"avatar_url":"https://avatars.githubusercontent.com/u/8588?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronjensen","html_url":"https://github.com/aaronjensen","followers_url":"https://api.github.com/users/aaronjensen/followers","following_url":"https://api.github.com/users/aaronjensen/following{/other_user}","gists_url":"https://api.github.com/users/aaronjensen/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronjensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronjensen/subscriptions","organizations_url":"https://api.github.com/users/aaronjensen/orgs","repos_url":"https://api.github.com/users/aaronjensen/repos","events_url":"https://api.github.com/users/aaronjensen/events{/privacy}","received_events_url":"https://api.github.com/users/aaronjensen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-17T19:32:28Z","updated_at":"2016-11-18T05:44:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sapegin/react-styleguidist/pulls/237","html_url":"https://github.com/sapegin/react-styleguidist/pull/237","diff_url":"https://github.com/sapegin/react-styleguidist/pull/237.diff","patch_url":"https://github.com/sapegin/react-styleguidist/pull/237.patch"},"body":"I finally got around to getting this working. This uses webpack's context feature to essentially express your intent that you want to require something from a particular directory, so rather than having to check in loader code we can check in the actual webpack compiled code.\n\nThis makes hot reloading work for new example files and I'm hoping it'll fix our usage with hard-source-webpack-plugin"},"comment":{"url":"https://api.github.com/repos/sapegin/react-styleguidist/issues/comments/261453781","html_url":"https://github.com/sapegin/react-styleguidist/pull/237#issuecomment-261453781","issue_url":"https://api.github.com/repos/sapegin/react-styleguidist/issues/237","id":261453781,"user":{"login":"aaronjensen","id":8588,"avatar_url":"https://avatars.githubusercontent.com/u/8588?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronjensen","html_url":"https://github.com/aaronjensen","followers_url":"https://api.github.com/users/aaronjensen/followers","following_url":"https://api.github.com/users/aaronjensen/following{/other_user}","gists_url":"https://api.github.com/users/aaronjensen/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronjensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronjensen/subscriptions","organizations_url":"https://api.github.com/users/aaronjensen/orgs","repos_url":"https://api.github.com/users/aaronjensen/repos","events_url":"https://api.github.com/users/aaronjensen/events{/privacy}","received_events_url":"https://api.github.com/users/aaronjensen/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T05:44:15Z","updated_at":"2016-11-18T05:44:15Z","body":"Ugh, this is more complicated than I thought. I only tested adding an example for an existing component. This does not work for adding an entirely new component and an example for it.\r\n\r\nI believe that in order to handle that I will need to change the configuration.\r\n\r\nRather than allowing globs to find components, we'll need to take the same parameters that `require.context` takes--path, include subdirectories and a regexp.\r\n\r\nIt'd look something like this:\r\n\r\n```js\r\n  sections: [\r\n    {\r\n      name: 'General',\r\n      sections: [\r\n        {\r\n          name: 'Particles',\r\n          path: './client/app/components/particles',\r\n          includeSubdirectories: true,\r\n          regExp: /\\.js$/,\r\n        },\r\n        {\r\n          name: 'Atoms',\r\n          path: './client/app/components/atoms',\r\n          includeSubdirectories: true,\r\n          regExp: /\\.js$/,\r\n        },\r\n      ],\r\n    },\r\n  ],\r\n```"}}
{"actor":{"display_login":"aaronjensen"}}