解决方法
您可以使用
gulp-filter像:
var gulp = require('gulp'); var stylus = require('gulp-stylus'); var concat = require('gulp-concat'); var Filter = require('gulp-filter'); gulp.task('css',function () { var filter = Filter('**/*.styl',{ restore: true }); return gulp.src([ './styles/stylus/**.styl','./styles/css/**.css' ]) .pipe(filter) .pipe(stylus()) .pipe(filter.restore) .pipe(concat('out.css')) .pipe(gulp.dest('./styles')); });