0
Ich versuche, meine SASS nach CSS zu kompilieren, aber meine Schluckuhr nur auf die erste Aufgabe - wo ist schlecht?
gulpfile.jsGulp nicht alle Aufgaben beobachten
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('styles', function() {
gulp.src('sass/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css/'));
});
gulp.task('bootstrap', function() {
gulp.src('sass/bootstrap/bootstrap.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./plugins/bootstrap/css/'));
});
gulp.task('default',function() {
gulp.watch('sass/*.scss',['styles']);
gulp.watch('sass/bootstrap/*.scss',['bootstrap']);
});
Struktur meiner Dateien:
assets
-- css/
---- style.css
-- node_modules/
---- (files from node)
-- sass/
---- bootstrap/
------- (parts of bootstrap)
---- bootstrap.scss
---- style.scss
-- gulpfile.js
-- package.json
ich kompilieren wollen:
assets/sass/style.scss -> assets/css/style.css
assets/sass/bootstrap.scss -> assets/plugins/bootstrap/css/bootstrap.min.css
Ich würde denken, dass Sie gerade hinzufügen return-Anweisungen zu Ihrem ‚Stil“ und ‚Bootstrap‘ Aufgaben dieses Problem beheben könnte. Darüber hinaus ist Ihre bootstrap.scss in Ihrem sass/* sein. SCSS Strom, den es Dich nicht erscheinen wollen. – Mark