En el proyecto tengo:
<!-- build:css css/error.css -->
<link rel="stylesheet" href="src/assets/styles/_bootstrap.scss" type="text/css" media="all">
<!-- endbuild -->
y el archivo de trago:
gulp.task("test", function () {
return gulp.src("path_to_html")
.pipe(gulp.src("path_to_styles"))
.pipe(gulpif("path_to_styles", sass()))
.pipe("path_to_styles".restore())
.pipe(useref())
.pipe(gulp.dest("target_folder"));
});
¿Cómo puedo primero transformar .scss en .css y luego usar use-ref.
Respuestas
0 para la respuesta № 1En mi proyecto uso gulp-rename
hacer cosas así
.pipe(rename({ suffix: ".min" }))
Instalar gulp-rename.
Y en tu tarea haz esto:
gulp.task("test", function () {
return gulp.src("path_to_html")
.pipe(gulp.src("path_to_styles"))
.pipe(gulpif("path_to_styles", sass()))
.pipe("path_to_styles".restore())
.pipe(rename({
extname: ".css"
}))
.pipe(useref())
.pipe(gulp.dest("target_folder"));
});