{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/289","labels_url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/289/comments","events_url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/289/events","html_url":"https://github.com/PolymerElements/polymer-starter-kit/issues/289","id":98569408,"number":289,"title":"Gulp tasks should be named functions wrapped and without runSequence","user":{"login":"dman777","id":887815,"avatar_url":"https://avatars.githubusercontent.com/u/887815?v=3","gravatar_id":"","url":"https://api.github.com/users/dman777","html_url":"https://github.com/dman777","followers_url":"https://api.github.com/users/dman777/followers","following_url":"https://api.github.com/users/dman777/following{/other_user}","gists_url":"https://api.github.com/users/dman777/gists{/gist_id}","starred_url":"https://api.github.com/users/dman777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dman777/subscriptions","organizations_url":"https://api.github.com/users/dman777/orgs","repos_url":"https://api.github.com/users/dman777/repos","events_url":"https://api.github.com/users/dman777/events{/privacy}","received_events_url":"https://api.github.com/users/dman777/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-01T23:48:26Z","updated_at":"2015-09-26T21:03:24Z","closed_at":"2015-09-26T09:43:14Z","body":"The gulp tasks have been written against gulp convention.  The true intention of the gulp design is to write regular Javascript functions, and only make the task for calling them. With this format, you would never need `runSequence` which uses(or used to use) `gulp.start()`. \r\n\r\nIf you need sync, use a promise library like [blue bird performance promise library](https://github.com/petkaantonov/bluebird/blob/master/API.md). I believe Gulp 4.0 has it's own promise's but I prefer performance bluebird. \r\n\r\nThis is from the authors of Gulp. Sources:\r\n[gulpjs/gulp#755](https://github.com/gulpjs/gulp/issues/755#issuecomment-61884019)\r\n[gulpjs/gulp#458](https://github.com/gulpjs/gulp/issues/458#issuecomment-62057370)\r\nexample on proper convention:\r\n\r\n\r\n\r\n```javascript\r\nfunction getJsFiles() {\r\n    var sourcePaths = [\r\n        './app/scripts/**/*.js',\r\n        '!./app/scripts/**/*.spec.js',\r\n        '!./app/scripts/app.js'\r\n    ];\r\n\r\n    var sources = gulp.src(sourcePaths, { read: false }).pipe(angularFilesort());\r\n\r\n    return gulp.src('./app/index.html')\r\n        .pipe(injector(sources, { ignorePath: 'app', addRootSlash: false }))\r\n        .pipe(gulp.dest('./app'));\r\n} \r\n```\r\n----------------------------\r\n```javascript \r\ngulp.task('js', function () {\r\n    jsStream = getJsFiles();\r\n});\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/comments/143495622","html_url":"https://github.com/PolymerElements/polymer-starter-kit/issues/289#issuecomment-143495622","issue_url":"https://api.github.com/repos/PolymerElements/polymer-starter-kit/issues/289","id":143495622,"user":{"login":"samccone","id":883126,"avatar_url":"https://avatars.githubusercontent.com/u/883126?v=3","gravatar_id":"","url":"https://api.github.com/users/samccone","html_url":"https://github.com/samccone","followers_url":"https://api.github.com/users/samccone/followers","following_url":"https://api.github.com/users/samccone/following{/other_user}","gists_url":"https://api.github.com/users/samccone/gists{/gist_id}","starred_url":"https://api.github.com/users/samccone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samccone/subscriptions","organizations_url":"https://api.github.com/users/samccone/orgs","repos_url":"https://api.github.com/users/samccone/repos","events_url":"https://api.github.com/users/samccone/events{/privacy}","received_events_url":"https://api.github.com/users/samccone/received_events","type":"User","site_admin":false},"created_at":"2015-09-26T21:03:24Z","updated_at":"2015-09-26T21:03:24Z","body":"No worries. This is OSS so any help is appreciated "}}