{"action":"created","issue":{"url":"https://api.github.com/repos/substack/bundle-collapser/issues/19","repository_url":"https://api.github.com/repos/substack/bundle-collapser","labels_url":"https://api.github.com/repos/substack/bundle-collapser/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/substack/bundle-collapser/issues/19/comments","events_url":"https://api.github.com/repos/substack/bundle-collapser/issues/19/events","html_url":"https://github.com/substack/bundle-collapser/issues/19","id":174732603,"number":19,"title":"[Question] How to use it correctly in a gulp pipeline","user":{"login":"Kikobeats","id":2096101,"avatar_url":"https://avatars.githubusercontent.com/u/2096101?v=3","gravatar_id":"","url":"https://api.github.com/users/Kikobeats","html_url":"https://github.com/Kikobeats","followers_url":"https://api.github.com/users/Kikobeats/followers","following_url":"https://api.github.com/users/Kikobeats/following{/other_user}","gists_url":"https://api.github.com/users/Kikobeats/gists{/gist_id}","starred_url":"https://api.github.com/users/Kikobeats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kikobeats/subscriptions","organizations_url":"https://api.github.com/users/Kikobeats/orgs","repos_url":"https://api.github.com/users/Kikobeats/repos","events_url":"https://api.github.com/users/Kikobeats/events{/privacy}","received_events_url":"https://api.github.com/users/Kikobeats/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-02T10:51:27Z","updated_at":"2016-09-02T11:42:44Z","closed_at":null,"body":"That's works perfectly:\r\n\r\n```coffee\r\ngulp.task 'browserify', ->\r\n  browserify()\r\n    .require(src.vanilla, expose: 'linkifier')\r\n    .bundle()\r\n  .pipe source 'linkifier.js'\r\n  .pipe uglify()\r\n  .pipe header banner, pkg: pkg\r\n  .pipe gulp.dest dist.folder\r\n```\r\n\r\nbut when I add the plugin something happens:\r\n\r\n```coffee\r\ngulp.task 'browserify', ->\r\n  browserify()\r\n    .require(src.vanilla, expose: 'linkifier')\r\n    .plugin(collapse)\r\n    .bundle()\r\n  .pipe source 'linkifier.js'\r\n  .pipe uglify()\r\n  .pipe header banner, pkg: pkg\r\n  .pipe gulp.dest dist.folder\r\n```\r\n\r\n```\r\n❯ gulp browserify\r\n[12:50:29] Requiring external module coffee-script/register\r\n[12:50:31] Using gulpfile ~/Projects/linkifier/gulpfile.coffee\r\n[12:50:31] Starting 'browserify'...\r\n[12:50:31] 'browserify' errored after 16 ms\r\n[12:50:31] SyntaxError: Unexpected token (1:8)\r\n  at Parser.pp.raise (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:943:13)\r\n  at Parser.pp.unexpected (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:1503:8)\r\n  at Parser.pp.expect (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:1497:26)\r\n  at Parser.pp.parseExprList (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:643:12)\r\n  at Parser.pp.parseExprAtom (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:306:28)\r\n  at Parser.pp.parseExprSubscripts (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:216:19)\r\n  at Parser.pp.parseMaybeUnary (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:197:19)\r\n  at Parser.pp.parseExprOps (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:151:19)\r\n  at Parser.pp.parseMaybeConditional (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:133:19)\r\n  at Parser.pp.parseMaybeAssign (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:110:19)\r\n  at Parser.pp.parseExpression (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:86:19)\r\n  at Parser.pp.parseStatement (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:1750:23)\r\n  at Parser.pp.parseTopLevel (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:1666:21)\r\n  at Parser.parse (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:1636:17)\r\n  at parse (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/node_modules/acorn/dist/acorn.js:905:44)\r\n  at module.exports (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/node_modules/browser-unpack/index.js:12:15)\r\n  at module.exports (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/bundle-collapser/index.js:6:16)\r\n  at Browserify.plugin (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/browserify/index.js:353:9)\r\n  at Gulp.<anonymous> (/Users/josefranciscoverdugambin/Projects/linkifier/gulpfile.coffee:43:6)\r\n  at module.exports (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/orchestrator/lib/runTask.js:34:7)\r\n  at Gulp.Orchestrator._runTask (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/orchestrator/index.js:273:3)\r\n  at Gulp.Orchestrator._runStep (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/orchestrator/index.js:214:10)\r\n  at Gulp.Orchestrator.start (/Users/josefranciscoverdugambin/Projects/linkifier/node_modules/orchestrator/index.js:134:8)\r\n  at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20\r\n  at nextTickCallbackWith0Args (node.js:420:9)\r\n  at process._tickCallback (node.js:349:13)\r\n  at Function.Module.runMain (module.js:443:11)\r\n  at startup (node.js:139:18)\r\n  at node.js:968:3\r\n```\r\n\r\nI suppose that I'm doing something but in the pipeline process, but what?"},"comment":{"url":"https://api.github.com/repos/substack/bundle-collapser/issues/comments/244353175","html_url":"https://github.com/substack/bundle-collapser/issues/19#issuecomment-244353175","issue_url":"https://api.github.com/repos/substack/bundle-collapser/issues/19","id":244353175,"user":{"login":"Kikobeats","id":2096101,"avatar_url":"https://avatars.githubusercontent.com/u/2096101?v=3","gravatar_id":"","url":"https://api.github.com/users/Kikobeats","html_url":"https://github.com/Kikobeats","followers_url":"https://api.github.com/users/Kikobeats/followers","following_url":"https://api.github.com/users/Kikobeats/following{/other_user}","gists_url":"https://api.github.com/users/Kikobeats/gists{/gist_id}","starred_url":"https://api.github.com/users/Kikobeats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kikobeats/subscriptions","organizations_url":"https://api.github.com/users/Kikobeats/orgs","repos_url":"https://api.github.com/users/Kikobeats/repos","events_url":"https://api.github.com/users/Kikobeats/events{/privacy}","received_events_url":"https://api.github.com/users/Kikobeats/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T11:42:44Z","updated_at":"2016-09-02T11:42:44Z","body":"Also this doesn't work for me\r\n\r\n```coffee\r\nbrowserify(src.vanilla, {standalone: 'linkifier'})\r\n    .plugin(require('bundle-collapser'))\r\n    .bundle()\r\n  .pipe source 'linkifier.js'\r\n  .pipe uglify()\r\n  .pipe header banner, pkg: pkg\r\n  .pipe gulp.dest dist.folder\r\n```"}}
{"actor":{"display_login":"Kikobeats"}}