0
Ich habe eine Reihe von Dateien in einem Verzeichnis scss
:Gulp Aufgabe, um alle Dateien in einem Verzeichnis zu kopieren, alle SCSS-Dateien kompilieren, andere unberührt lassen?
scss/
file.scss
anotherfile.scss
image.jpeg
dir/
other.ttf
ich gulp
möchte dies kompilieren: es kompiliert
css/
file.css
anotherfile.css
image.jpeg
dir/
other.ttf
Aktuell alle .css
Dateien, aber es kopiert nicht über jede der anderen Dateien.
Dies ist, was ich derzeit habe;
const path2 = require('path');
...
gulp.task('sass', function() {
gulp.src("./scss/*.scss")
.pipe(sass({outputStyle: 'compressed'}))
.on('error', onError)
.pipe(rename (function (path) {
path.dirname = path.dirname.replace(path2.sep + "scss", path2.sep + "css");
path.extname = ".css";
}))
.pipe(gulp.dest('./'));
});
Wie kann ich das tun?
Danke.