{"action":"created","issue":{"url":"https://api.github.com/repos/paulmillr/chokidar/issues/484","repository_url":"https://api.github.com/repos/paulmillr/chokidar","labels_url":"https://api.github.com/repos/paulmillr/chokidar/issues/484/labels{/name}","comments_url":"https://api.github.com/repos/paulmillr/chokidar/issues/484/comments","events_url":"https://api.github.com/repos/paulmillr/chokidar/issues/484/events","html_url":"https://github.com/paulmillr/chokidar/issues/484","id":155463823,"number":484,"title":"Watch glob with placeholder in the middle","user":{"login":"apfelbox","id":1032411,"avatar_url":"https://avatars.githubusercontent.com/u/1032411?v=3","gravatar_id":"","url":"https://api.github.com/users/apfelbox","html_url":"https://github.com/apfelbox","followers_url":"https://api.github.com/users/apfelbox/followers","following_url":"https://api.github.com/users/apfelbox/following{/other_user}","gists_url":"https://api.github.com/users/apfelbox/gists{/gist_id}","starred_url":"https://api.github.com/users/apfelbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apfelbox/subscriptions","organizations_url":"https://api.github.com/users/apfelbox/orgs","repos_url":"https://api.github.com/users/apfelbox/repos","events_url":"https://api.github.com/users/apfelbox/events{/privacy}","received_events_url":"https://api.github.com/users/apfelbox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-05-18T10:08:21Z","updated_at":"2016-08-09T07:42:14Z","closed_at":null,"body":"Hi,\r\n\r\nI want to watch the following glob:\r\n`src/**/Resources/` and I want to be notified if a new directory is added that matches the glob.\r\n\r\nI don't care about files / subdirectories contained in the globs, I just want the base directories.\r\n\r\nI tried\r\n```js\r\nchokidar.watch(\"src/**/Resources/\", {ignoreInitial: false})\r\n                .on(\"addDir\",    path => console.log(path))\r\n                .on(\"unlinkDir\", path => console.log(path))\r\n                .on(\"add\",       path => console.log(path));\r\n```\r\n\r\nbut got nothing (no output).\r\n\r\n```js\r\nglob.sync(\"src/**/Resources/\", (err, dirs) => console.log(dirs))\r\n```\r\n\r\ncorrectly returns the directories.\r\nIs watching for directories not supported or do I have to configure something differently?"},"comment":{"url":"https://api.github.com/repos/paulmillr/chokidar/issues/comments/238477813","html_url":"https://github.com/paulmillr/chokidar/issues/484#issuecomment-238477813","issue_url":"https://api.github.com/repos/paulmillr/chokidar/issues/484","id":238477813,"user":{"login":"apfelbox","id":1032411,"avatar_url":"https://avatars.githubusercontent.com/u/1032411?v=3","gravatar_id":"","url":"https://api.github.com/users/apfelbox","html_url":"https://github.com/apfelbox","followers_url":"https://api.github.com/users/apfelbox/followers","following_url":"https://api.github.com/users/apfelbox/following{/other_user}","gists_url":"https://api.github.com/users/apfelbox/gists{/gist_id}","starred_url":"https://api.github.com/users/apfelbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apfelbox/subscriptions","organizations_url":"https://api.github.com/users/apfelbox/orgs","repos_url":"https://api.github.com/users/apfelbox/repos","events_url":"https://api.github.com/users/apfelbox/events{/privacy}","received_events_url":"https://api.github.com/users/apfelbox/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T07:42:14Z","updated_at":"2016-08-09T07:42:14Z","body":"Hi @UltCombo, thanks for the suggestion and sorry for the late reply. I just tested it with `depth: 0` but it still doesn't find the directories."}}
{"actor":{"display_login":"apfelbox"}}