Why do I have to use vinyl-source-stream with gulp?

前端 未结 2 2090
再見小時候
再見小時候 2021-01-31 01:54

I am trying to use gulp and browserify to transform my .jsx files into .js files.

var gulp = require(\'gulp\');
var browserify = requir         


        
相关标签:
2条回答
  • 2021-01-31 02:02

    I think that reading this article gulp The vision, history, and future of the project can help you to clarify a few concepts.

    Basically you can say that vinyl-source-stream convert the readable stream you get from browserify into a vinyl stream that is what gulp is expecting to get.

    A vinyl stream is a Virtual file format, and it is fundamental for Gulp. Thanks to this vinyl streams Gulp doesn't need to write a temporal file between different transformations. And this is one of the main advantages it has over Grunt.

    0 讨论(0)
  • 2021-01-31 02:07

    This module is just a bridge that makes it simple to use conventional text streams such as this in combination with gulp.

    0 讨论(0)
提交回复
热议问题