zont / gulp-bower

MIT License
82 stars 22 forks source link

Weird streams issue under Windows #19

Closed mvallerie closed 9 years ago

mvallerie commented 9 years ago

Hi :).

There is an issue on Windows with this plugin. Here is my gulp task :

gulp.task 'bower', ->
  bower()
    .pipe(gulpif(isProd(), gulp.dest('./dist/lib/'), gulp.dest('./build/lib/')))

and here is my bower.json :

{
  // ...
  "dependencies": {
    "react": "~0.11.1",
    "semantic-ui": "~0.19.0",
    "jquery": "~2.1.1",
    "react-router": "~0.5.2",
    "morrisjs": "~0.5.1"
  }
}

Actually, only semantic-ui files are copied to build/lib directory. This issue happens only under Windows. I didn't investigate too much but it seems that removing the following line in your index.js fixes the problem :

stream.emit("end");

Because i'm not sure what the implications are, i'm not submitting a pull request. I know this plugin should not be used that way (i'm going to replace it with main-bower-files for bower resources packaging) but i wanted to let you know :).

jfarid27 commented 9 years ago

Can this be reopened? It would be nice to support async tasks and know exactly when gulp bower is done. For some reason, calling .end() alone doesn't fire the 'finish' event, so there's no way to know when the bower task is finished. I'm running on node v0.10.33 with the latest gulp-bower as well.