{"action":"created","issue":{"url":"https://api.github.com/repos/OverZealous/lazypipe/issues/24","repository_url":"https://api.github.com/repos/OverZealous/lazypipe","labels_url":"https://api.github.com/repos/OverZealous/lazypipe/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/OverZealous/lazypipe/issues/24/comments","events_url":"https://api.github.com/repos/OverZealous/lazypipe/issues/24/events","html_url":"https://github.com/OverZealous/lazypipe/issues/24","id":146060088,"number":24,"title":"strange TypeError: dest.on is not a function with lazypipe","user":{"login":"asiniy","id":1296472,"avatar_url":"https://avatars.githubusercontent.com/u/1296472?v=3","gravatar_id":"","url":"https://api.github.com/users/asiniy","html_url":"https://github.com/asiniy","followers_url":"https://api.github.com/users/asiniy/followers","following_url":"https://api.github.com/users/asiniy/following{/other_user}","gists_url":"https://api.github.com/users/asiniy/gists{/gist_id}","starred_url":"https://api.github.com/users/asiniy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asiniy/subscriptions","organizations_url":"https://api.github.com/users/asiniy/orgs","repos_url":"https://api.github.com/users/asiniy/repos","events_url":"https://api.github.com/users/asiniy/events{/privacy}","received_events_url":"https://api.github.com/users/asiniy/received_events","type":"User","site_admin":false},"labels":[{"id":75878690,"url":"https://api.github.com/repos/OverZealous/lazypipe/labels/invalid","name":"invalid","color":"e6e6e6","default":true},{"id":75878691,"url":"https://api.github.com/repos/OverZealous/lazypipe/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-04-05T17:46:24Z","updated_at":"2016-12-17T23:36:42Z","closed_at":"2016-04-06T05:25:14Z","body":"Hello @OverZealous I'm using `lazypipe()` as template to DRY my gulp tasks.\n\nUnfortunately, I get an error:\n\n```\nserge@serge:~/projects/haystak$ gulp deploy\n[20:41:50] Starting 'deploy'...\nBuilding APP bundle\n[20:41:50] 'deploy' errored after 25 ms\n[20:41:50] TypeError: dest.on is not a function\n    at Duplexer.Readable.pipe (/home/serge/projects/korob/node_modules/readable-stream/lib/_stream_readable.js:485:8)\n    at rebundle (/home/serge/projects/korob/Gulpfile.js:69:8)\n    at browserifyTask (/home/serge/projects/korob/Gulpfile.js:82:3)\n    at Gulp.<anonymous> (/home/serge/projects/korob/Gulpfile.js:229:3)\n    at module.exports (/home/serge/projects/korob/node_modules/orchestrator/lib/runTask.js:34:7)\n    at Gulp.Orchestrator._runTask (/home/serge/projects/korob/node_modules/orchestrator/index.js:273:3)\n    at Gulp.Orchestrator._runStep (/home/serge/projects/korob/node_modules/orchestrator/index.js:214:10)\n    at /home/serge/projects/korob/node_modules/orchestrator/index.js:279:18\n    at finish (/home/serge/projects/korob/node_modules/orchestrator/lib/runTask.js:21:8)\n    at cb (/home/serge/projects/korob/node_modules/orchestrator/lib/runTask.js:29:3)\n\n```\n\nmy gulpfile (I removed unnecessary lines out of scope + plus add references to lines):\n\n``` javascript\nvar browserify  = require('browserify');\nvar babelify    = require('babelify');\nvar pathmodify  = require('pathmodify');\nvar path        = require('path');\nvar concat      = require('gulp-concat');\nvar cssmin      = require('gulp-cssmin');\nvar glob        = require('glob');\nvar gulp        = require('gulp');\nvar gulpif      = require('gulp-if');\nvar gutil       = require('gulp-util');\nvar rev         = require('gulp-rev');\nvar revReplace  = require('gulp-rev-replace');\nvar buffer      = require('gulp-buffer');\nvar insertLines = require('gulp-insert-lines');\nvar livereload  = require('gulp-livereload');\nvar htmlmin     = require('gulp-htmlmin');\nvar notify      = require('gulp-notify');\nvar sass        = require('gulp-ruby-sass');\nvar shell       = require('gulp-shell');\nvar slim        = require('gulp-slim');\nvar source      = require('vinyl-source-stream');\nvar streamify   = require('gulp-streamify');\nvar uglify      = require('gulp-uglify');\nvar watchify    = require('watchify');\n\nvar lazypipe = require('lazypipe');\n// Add md5 hashsums to assets\nfunction revFiles(dest) {\n  return lazypipe()\n    .pipe(gulp.dest, dest);\n}\n\nvar browserifyTask = function (options) {\n  // Our app bundler\n  var appBundler = browserify({\n    entries: [options.src], // Only need initial file, browserify finds the rest\n    debug: options.development, // Gives us sourcemapping\n    cache: {}, packageCache: {}, fullPaths: options.development // Requirement of watchify\n  })\n    .plugin(pathmodify, {\n      mods: [\n        pathmodify.mod.dir('npm', path.join(__dirname, 'node_modules'))\n      ]\n    })\n    .transform(babelify, { presets: ['react', 'es2015'] })\n\n  // The rebundle process\n  var rebundle = function () {\n    var start = Date.now();\n    console.log('Building APP bundle');\n    appBundler.bundle()\n      .on('error', gutil.log)\n      .pipe(source('application.js'))\n      .pipe(gulpif(!options.development, streamify(uglify())))\n      .pipe(revFiles(options.dest)) // line 69\n      .pipe(notify(function () {\n        console.log('APP bundle built in ' + (Date.now() - start) + 'ms');\n      }))\n      .on(\"finish\", function() { refreshView(options) });\n  };\n\n  // Fire up Watchify when developing\n  if (options.development) {\n    appBundler = watchify(appBundler);\n    appBundler.on('update', rebundle);\n  }\n\n  rebundle(); // line 82\n}\n\ngulp.task('deploy', function () {\n  browserifyTask({ // line 229\n    development: false,\n    src: './app/coffee/application.js',\n    dest: './public/dist/'\n  });\n});\n```\n\nI'll be appreciated by your help\n"},"comment":{"url":"https://api.github.com/repos/OverZealous/lazypipe/issues/comments/267794036","html_url":"https://github.com/OverZealous/lazypipe/issues/24#issuecomment-267794036","issue_url":"https://api.github.com/repos/OverZealous/lazypipe/issues/24","id":267794036,"user":{"login":"OverZealous","id":965719,"avatar_url":"https://avatars.githubusercontent.com/u/965719?v=3","gravatar_id":"","url":"https://api.github.com/users/OverZealous","html_url":"https://github.com/OverZealous","followers_url":"https://api.github.com/users/OverZealous/followers","following_url":"https://api.github.com/users/OverZealous/following{/other_user}","gists_url":"https://api.github.com/users/OverZealous/gists{/gist_id}","starred_url":"https://api.github.com/users/OverZealous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OverZealous/subscriptions","organizations_url":"https://api.github.com/users/OverZealous/orgs","repos_url":"https://api.github.com/users/OverZealous/repos","events_url":"https://api.github.com/users/OverZealous/events{/privacy}","received_events_url":"https://api.github.com/users/OverZealous/received_events","type":"User","site_admin":false},"created_at":"2016-12-17T23:36:42Z","updated_at":"2016-12-17T23:36:42Z","body":"Whoops, wrong username. Sorry if I pulled in someone else. 😕"}}
{"actor":{"display_login":"OverZealous"}}