Modify file in place (same dest) using Gulp.js and a globbing pattern

后端 未结 5 855
滥情空心
滥情空心 2020-11-28 03:36

I have a gulp task that is attempting to convert .scss files into .css files (using gulp-ruby-sass) and then place the resulting .css file into the same place it found the o

5条回答
  •  旧时难觅i
    2020-11-28 04:20

    gulp.src("sass/**/*.scss")
      .pipe(sass())
      .pipe(gulp.dest(function(file) {
        return file.base;
      }));
    

    Originally answer given here: https://stackoverflow.com/a/29817916/3834540.

    I know this thread is old but it still shows up as the first result on google so I thought I might as well post the link here.

提交回复
热议问题