{"action":"created","issue":{"url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/issues/50","labels_url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/issues/50/comments","events_url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/issues/50/events","html_url":"https://github.com/dowjones/gulp-bundle-assets/issues/50","id":62783729,"number":50,"title":"minCSS Option Throws Error in 2.17.2 and Up","user":{"login":"smschrader","id":10202727,"avatar_url":"https://avatars.githubusercontent.com/u/10202727?v=3","gravatar_id":"","url":"https://api.github.com/users/smschrader","html_url":"https://github.com/smschrader","followers_url":"https://api.github.com/users/smschrader/followers","following_url":"https://api.github.com/users/smschrader/following{/other_user}","gists_url":"https://api.github.com/users/smschrader/gists{/gist_id}","starred_url":"https://api.github.com/users/smschrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smschrader/subscriptions","organizations_url":"https://api.github.com/users/smschrader/orgs","repos_url":"https://api.github.com/users/smschrader/repos","events_url":"https://api.github.com/users/smschrader/events{/privacy}","received_events_url":"https://api.github.com/users/smschrader/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/milestones/1","html_url":"https://github.com/dowjones/gulp-bundle-assets/milestones/2.x","labels_url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/milestones/1/labels","id":742492,"number":1,"title":"2.x","description":"","creator":{"login":"chmontgomery","id":232356,"avatar_url":"https://avatars.githubusercontent.com/u/232356?v=3","gravatar_id":"","url":"https://api.github.com/users/chmontgomery","html_url":"https://github.com/chmontgomery","followers_url":"https://api.github.com/users/chmontgomery/followers","following_url":"https://api.github.com/users/chmontgomery/following{/other_user}","gists_url":"https://api.github.com/users/chmontgomery/gists{/gist_id}","starred_url":"https://api.github.com/users/chmontgomery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chmontgomery/subscriptions","organizations_url":"https://api.github.com/users/chmontgomery/orgs","repos_url":"https://api.github.com/users/chmontgomery/repos","events_url":"https://api.github.com/users/chmontgomery/events{/privacy}","received_events_url":"https://api.github.com/users/chmontgomery/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":22,"state":"open","created_at":"2014-08-04T17:50:37Z","updated_at":"2015-05-07T21:53:16Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-03-18T19:51:04Z","updated_at":"2015-07-09T21:24:05Z","closed_at":"2015-05-07T21:53:16Z","body":"Error - \r\n```javascript\r\nevents.js:74\r\n        throw TypeError('Uncaught, unspecified \"error\" event.');\r\n...\r\n  at ...\\node_modules\\gulp-bundle-assets\\n\r\node_modules\\gulp-minify-css\\node_modules\\clean-css\\lib\\clean.js:71:41\r\n  at process._tickCallback (node.js:419:13)\r\n```\r\n\r\nis thrown when option is enabled for Less files. Issues goes away with earlier releases. \r\nSeems to be an issue with the clean-css module. \r\n\r\nMight be related to Issue https://github.com/jonathanepollack/gulp-minify-css/issues/61\r\n\r\nSample Config:\r\n```javascript\r\nvar lazypipe = require(__base + 'lazypipe'),\r\n    gif = require(__base + 'gulp-if'),\r\n    less = require(__base + 'gulp-less');\r\n\r\nfunction stringEndsWith(str, suffix) {\r\n  return str.indexOf(suffix, str.length - suffix.length) !== -1;\r\n}\r\n\r\nfunction isLessFile(file) {\r\n  return stringEndsWith(file.relative, 'less');\r\n}\r\n\r\nvar styleTransforms = lazypipe()  \r\n  .pipe(function() {\r\n    return gif(isLessFile, less({\r\n\t\trootpath: \"../\"\t\t\r\n\t}));\r\n  });\r\n\r\nmodule.exports = {\r\n    bundle: {        \r\n\t\tmain: {      \r\n            styles: [\r\n                __webapp + 'stylesheet/src/main.less'\r\n            ],\r\n            options: {\r\n                useMin: false, // pre-minified files                 \r\n                minCSS: true, \r\n                rev: true,\r\n                transforms: {\r\n                    styles: styleTransforms\r\n                }\r\n            }\r\n        }\r\n    }\r\n};\r\n```\r\n\r\nSample Gulp Task:\r\n```javascript\r\n//Bundle, compress, and write less to dist\r\ngulp.task('lessMain', ['cleanCSS'], function() {  \r\n    return gulp.src(projectPaths.cssMainConfig)        \r\n        .pipe(bundle().on(\"error\", gutil.log))        \r\n        .pipe(bundle.results({\r\n            fileName: 'main.result',\r\n            dest: projectPaths.cssResults,\r\n            pathPrefix: '<%=request.getContextPath()%>/dist/styles/'\r\n        }))        \r\n        .pipe(gulp.dest(projectPaths.cssDist));\r\n});\r\n```\r\n "},"comment":{"url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/issues/comments/120148058","html_url":"https://github.com/dowjones/gulp-bundle-assets/issues/50#issuecomment-120148058","issue_url":"https://api.github.com/repos/dowjones/gulp-bundle-assets/issues/50","id":120148058,"user":{"login":"smschrader","id":10202727,"avatar_url":"https://avatars.githubusercontent.com/u/10202727?v=3","gravatar_id":"","url":"https://api.github.com/users/smschrader","html_url":"https://github.com/smschrader","followers_url":"https://api.github.com/users/smschrader/followers","following_url":"https://api.github.com/users/smschrader/following{/other_user}","gists_url":"https://api.github.com/users/smschrader/gists{/gist_id}","starred_url":"https://api.github.com/users/smschrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smschrader/subscriptions","organizations_url":"https://api.github.com/users/smschrader/orgs","repos_url":"https://api.github.com/users/smschrader/repos","events_url":"https://api.github.com/users/smschrader/events{/privacy}","received_events_url":"https://api.github.com/users/smschrader/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T21:24:05Z","updated_at":"2015-07-09T21:24:05Z","body":"Actually, the error is fixed, but it's now not including any .less files when minCss is true. Even with the options passed.\r\n\r\nSo, the error being thrown has been addressed, but the underlying lying issue(s) is still there. "}}