{"action":"created","issue":{"url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/194","labels_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/194/comments","events_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/194/events","html_url":"https://github.com/floatdrop/gulp-watch/issues/194","id":101470979,"number":194,"title":"watch('**/*.js') doesn't works like gulp","user":{"login":"rafaelsq","id":1598854,"avatar_url":"https://avatars.githubusercontent.com/u/1598854?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelsq","html_url":"https://github.com/rafaelsq","followers_url":"https://api.github.com/users/rafaelsq/followers","following_url":"https://api.github.com/users/rafaelsq/following{/other_user}","gists_url":"https://api.github.com/users/rafaelsq/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelsq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelsq/subscriptions","organizations_url":"https://api.github.com/users/rafaelsq/orgs","repos_url":"https://api.github.com/users/rafaelsq/repos","events_url":"https://api.github.com/users/rafaelsq/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelsq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-17T17:36:09Z","updated_at":"2015-09-30T20:40:58Z","closed_at":null,"body":"it doesn't trigger events for files matched by glob/pattern like gulp.\r\n\r\nFiles structure:\r\n```\r\n./assets/es6/main.js\r\n./assets/es6/utils/utils.js\r\n```\r\n\r\nworking\r\n```JAVASCRIPT\r\ngulp.watch('assets/es6/**/*.js', ['es6']);\r\ngulp.src('assets/es6/**/*.js').pipe(print()); \r\n\r\n// both cases will work just fine and print main.js and utils.js\r\n```\r\n\r\nnot working\r\n```JAVASCRIPT\r\n// it will trigger only for utils.js\r\ngulpWatch('assets/es6/**/*.js');\r\n\r\n// I've found this workaround.\r\ngulpWatch('assets/es6/{,**/}*.js');\r\n```"},"comment":{"url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/comments/144536808","html_url":"https://github.com/floatdrop/gulp-watch/issues/194#issuecomment-144536808","issue_url":"https://api.github.com/repos/floatdrop/gulp-watch/issues/194","id":144536808,"user":{"login":"JMBattista","id":1935082,"avatar_url":"https://avatars.githubusercontent.com/u/1935082?v=3","gravatar_id":"","url":"https://api.github.com/users/JMBattista","html_url":"https://github.com/JMBattista","followers_url":"https://api.github.com/users/JMBattista/followers","following_url":"https://api.github.com/users/JMBattista/following{/other_user}","gists_url":"https://api.github.com/users/JMBattista/gists{/gist_id}","starred_url":"https://api.github.com/users/JMBattista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JMBattista/subscriptions","organizations_url":"https://api.github.com/users/JMBattista/orgs","repos_url":"https://api.github.com/users/JMBattista/repos","events_url":"https://api.github.com/users/JMBattista/events{/privacy}","received_events_url":"https://api.github.com/users/JMBattista/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T20:40:58Z","updated_at":"2015-09-30T20:40:58Z","body":"I wanted to chime in that I'm seeing a similar issue. Everything will work fine at first, then at some point in the course of development the js:watch below will break, but the html:watch will keep working fine. The js:watch will keep working for files at src/client/app/foo/*.js but src/client/app/foo/BAR/*.js stops working.\r\n\r\n\r\n\r\ngulp.task('js-dev', function () {\r\n    var ts = config.filter.ts();\r\n\r\n    return gulp.src(config.source)\r\n        .pipe(sourcemaps.init())\r\n        .pipe(plumber())\r\n        .pipe(ts)\r\n            .pipe(tsc(tsProject))\r\n        .pipe(ts.restore)\r\n        .pipe(babel())\r\n        .pipe(ngAnnotate())\r\n        .pipe(concat('app.js'))\r\n        .pipe(sourcemaps.write())\r\n        .pipe(gulp.dest(config.dest + 'js/'))\r\n        .pipe(livereload());\r\n});\r\n\r\ngulp.task('js:watch', ['js-dev'], function () {\r\n    livereload.listen();\r\n    watch(config.source, function() {\r\n        gulp.start('js-dev')\r\n    });\r\n});\r\n\r\n\r\ngulp.task('html:partials', function () {\r\n    return gulp.src(config.html)\r\n        .pipe(templateCache(config.templateCache.file, config.templateCache.options))\r\n        // .pipe(minifyHTML({empty:true}))\r\n        .pipe(gulp.dest(config.dest + 'js/'))\r\n        .pipe(livereload());\r\n});\r\n\r\ngulp.task('html:watch', ['html'], function () {\r\n    livereload.listen();\r\n    watch(config.html, function() {\r\n        gulp.start('html:partials');\r\n    });\r\n    watch([config.index, config.bower.source, config.bower.style], function() {\r\n        gulp.start('html:index')\r\n    });\r\n});\r\n"}}