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:29

    if you want to save all files in their own path in the dist folder

    const media = () => {
        return gulp.src('./src/assets/media/**/*')
            .pipe(gulp.dest(file => file.base.replace('src', 'dist'))
        )
    }
    
    const watch = () => {
      gulp.watch(
        "./src/**/*",
        media
      );
    };
    

提交回复
热议问题