<i id='5pZyo'><tr id='5pZyo'><dt id='5pZyo'><q id='5pZyo'><span id='5pZyo'><b id='5pZyo'><form id='5pZyo'><ins id='5pZyo'></ins><ul id='5pZyo'></ul><sub id='5pZyo'></sub></form><legend id='5pZyo'></legend><bdo id='5pZyo'><pre id='5pZyo'><center id='5pZyo'></center></pre></bdo></b><th id='5pZyo'></th></span></q></dt></tr></i><div id='5pZyo'><tfoot id='5pZyo'></tfoot><dl id='5pZyo'><fieldset id='5pZyo'></fieldset></dl></div>
  • <small id='5pZyo'></small><noframes id='5pZyo'>

        <bdo id='5pZyo'></bdo><ul id='5pZyo'></ul>
    1. <tfoot id='5pZyo'></tfoot>

      <legend id='5pZyo'><style id='5pZyo'><dir id='5pZyo'><q id='5pZyo'></q></dir></style></legend>

      1. 为什么我必须在 gulp 中使用vinyl-source-stream?

        时间:2023-05-27
          <tbody id='perw5'></tbody>

      2. <legend id='perw5'><style id='perw5'><dir id='perw5'><q id='perw5'></q></dir></style></legend>

      3. <tfoot id='perw5'></tfoot>

          <i id='perw5'><tr id='perw5'><dt id='perw5'><q id='perw5'><span id='perw5'><b id='perw5'><form id='perw5'><ins id='perw5'></ins><ul id='perw5'></ul><sub id='perw5'></sub></form><legend id='perw5'></legend><bdo id='perw5'><pre id='perw5'><center id='perw5'></center></pre></bdo></b><th id='perw5'></th></span></q></dt></tr></i><div id='perw5'><tfoot id='perw5'></tfoot><dl id='perw5'><fieldset id='perw5'></fieldset></dl></div>

          <small id='perw5'></small><noframes id='perw5'>

                • <bdo id='perw5'></bdo><ul id='perw5'></ul>
                  本文介绍了为什么我必须在 gulp 中使用vinyl-source-stream?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在尝试使用 gulp 和 browserify 将我的 .jsx 文件转换为 .js 文件.

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

                  var gulp = require('gulp');
                  var browserify = require('browserify');
                  var reactify = require('reactify');
                  
                  gulp.task('js', function () {
                    browserify('public/javascripts/src/app.jsx')
                      .transform(reactify)
                      .bundle()
                      .pipe(gulp.dest('public/javascripts/dist'))
                  });
                  

                  ```

                  上面抛出的path.resolve 的参数必须是字符串.我设法通过使用 vinyl-source-stream

                  The above threw Arguments to path.resolve must be strings. I managed to get around it by using vinyl-source-stream

                  var source = require('vinyl-source-stream');
                  ...
                  .bundle()
                  .source('app.js')
                  ...
                  

                  为什么会这样?我对 nodejs 和 gulp 还很陌生.看了项目的README和源码,还是一头雾水.有什么帮助吗?

                  Why does this work? I am fairly new to nodejs and gulp. After reading the README of the project and the source code, I am still confused. Any help?

                  推荐答案

                  我认为阅读这篇文章 <强>一饮而尽该项目的愿景、历史和未来可以帮助您澄清一些概念.

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

                  基本上你可以说 vinyl-source-stream 转换 可读流你从 browserify 得到的 vinyl 流 这就是 gulp 期望得到的.

                  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.

                  乙烯基流是一种虚拟文件格式,它是Gulp的基础.多亏了这个乙烯基流,Gulp 不需要在不同的转换之间编写临时文件.这是它优于 Grunt 的主要优势之一.

                  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.

                  这篇关于为什么我必须在 gulp 中使用vinyl-source-stream?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 Gulp 中将 CSS 文件的内容注入 HTML? 下一篇:使用 Gulp 编译 Sass 并缩小供应商 css

                  相关文章

                  最新文章

                  <tfoot id='1YFzU'></tfoot>

                    <bdo id='1YFzU'></bdo><ul id='1YFzU'></ul>
                  <i id='1YFzU'><tr id='1YFzU'><dt id='1YFzU'><q id='1YFzU'><span id='1YFzU'><b id='1YFzU'><form id='1YFzU'><ins id='1YFzU'></ins><ul id='1YFzU'></ul><sub id='1YFzU'></sub></form><legend id='1YFzU'></legend><bdo id='1YFzU'><pre id='1YFzU'><center id='1YFzU'></center></pre></bdo></b><th id='1YFzU'></th></span></q></dt></tr></i><div id='1YFzU'><tfoot id='1YFzU'></tfoot><dl id='1YFzU'><fieldset id='1YFzU'></fieldset></dl></div>
                • <legend id='1YFzU'><style id='1YFzU'><dir id='1YFzU'><q id='1YFzU'></q></dir></style></legend>

                    1. <small id='1YFzU'></small><noframes id='1YFzU'>