{"action":"created","issue":{"url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/237","repository_url":"https://api.github.com/repos/floatdrop/gulp-watch","labels_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/237/comments","events_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/237/events","html_url":"https://github.com/floatdrop/gulp-watch/issues/237","id":160142582,"number":237,"title":"Argument glob array does not work correctly","user":{"login":"caikan","id":15881392,"avatar_url":"https://avatars.githubusercontent.com/u/15881392?v=3","gravatar_id":"","url":"https://api.github.com/users/caikan","html_url":"https://github.com/caikan","followers_url":"https://api.github.com/users/caikan/followers","following_url":"https://api.github.com/users/caikan/following{/other_user}","gists_url":"https://api.github.com/users/caikan/gists{/gist_id}","starred_url":"https://api.github.com/users/caikan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caikan/subscriptions","organizations_url":"https://api.github.com/users/caikan/orgs","repos_url":"https://api.github.com/users/caikan/repos","events_url":"https://api.github.com/users/caikan/events{/privacy}","received_events_url":"https://api.github.com/users/caikan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-14T10:01:14Z","updated_at":"2016-06-18T23:49:28Z","closed_at":null,"body":"Some patterns will not work, when there is a \"not match\" pattern before them.\r\nOS:Windows 7.\r\n```\r\n// The 3rd pattern in this example doesn't work. \r\nwatch(['src/**', '!src/**/*.js', 'src/**/*.min.js'], function (vinyl) {\r\n\tconsole.log('[watcher]', vinyl.relative);\r\n});\r\n```\r\n```\r\n// This still doesn't work\r\nvar watcher = watch(['src/**', '!src/**/*.js'], function (vinyl) {\r\n\tconsole.log('[watcher 1]', vinyl.relative);\r\n});\r\nwatcher.add('src/**/*.min.js');\r\n```\r\n```\r\n// I use this way to around this bug.\r\nwatch(['src/**', '!src/**/*.js'], function (vinyl) {\r\n\tconsole.log('[watcher 1]', vinyl.relative);\r\n});\r\nwatch(['src/**/*.min.js'], function (vinyl) {\r\n\tconsole.log('[watcher 2]', vinyl.relative);\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/comments/226971286","html_url":"https://github.com/floatdrop/gulp-watch/issues/237#issuecomment-226971286","issue_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/237","id":226971286,"user":{"login":"UltCombo","id":2090712,"avatar_url":"https://avatars.githubusercontent.com/u/2090712?v=3","gravatar_id":"","url":"https://api.github.com/users/UltCombo","html_url":"https://github.com/UltCombo","followers_url":"https://api.github.com/users/UltCombo/followers","following_url":"https://api.github.com/users/UltCombo/following{/other_user}","gists_url":"https://api.github.com/users/UltCombo/gists{/gist_id}","starred_url":"https://api.github.com/users/UltCombo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UltCombo/subscriptions","organizations_url":"https://api.github.com/users/UltCombo/orgs","repos_url":"https://api.github.com/users/UltCombo/repos","events_url":"https://api.github.com/users/UltCombo/events{/privacy}","received_events_url":"https://api.github.com/users/UltCombo/received_events","type":"User","site_admin":false},"created_at":"2016-06-18T23:49:28Z","updated_at":"2016-06-18T23:49:28Z","body":"Let me make sure I understand correctly: you want negative globs to be processed in the order they appear in the patterns array, similarly to what I have implemented in gulp's glob-stream? (gulpjs/glob-stream#25 / gulpjs/glob-stream#27)\r\n\r\nI believe it may be the case that gulp-watch's underlying file system watcher—Chokidar—always executes negative globs last, so that's why your sample fails. Please file a feature request in the [Chokidar repository](https://github.com/paulmillr/chokidar)."}}
{"actor":{"display_login":"UltCombo"}}