0

I'm trying to set a shopify dev workflow, and i'm stuck in a problem. How can i change the dest() output in gulp-sass to use .liquid files in the assets folder?

gulp.task('sass', function() {
  gulp.src('stylesheets/*.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.dest('./assets/'));
});

I want to get as output something like main.css.liquid, so i can use the .liquid methods. Is that possible?

1 Answers1

0

There's a good thread about it @ Gulp. As said it seems that gulp-rename may be a great fit.

In your case, you can change your code to:

gulp.task('sass', function() {
    gulp.src('stylesheets/*.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.rename('destinationpath/yourfile.liquid'));
    .pipe(gulp.dest('./assets/'));
});
Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
rmjoia
  • 962
  • 12
  • 21
  • thanks man! i've already solved and forgot to put the answer here, but that's pretty much the solution! I added gulp-rename and add it to the sass task a bit different than you did. :) `.pipe(rename({ suffix: '.css', extname: '.liquid' }))` obrigado! – ricardogoldstein Jan 16 '16 at 17:38