地图文件似乎指向错误的文件。
例如,而不是demo.css
它指向example.css
。
我想我做错了什么?
这是我如何为CSS缩小和连接定义我的css任务的示例:
var gulp = require('gulp');
var rename = require('gulp-rename');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var minifyCss = require('gulp-clean-css');
var gp_concat = require('gulp-concat');
var size = require('gulp-size');
var path ={
css: './styles/',
dist: './dist/'
};
gulp.task('css', function() {
gulp.src([
'./bower_components/aaa.css',
path.css + 'demo.css',
path.css + 'example.css',
path.css + 'another.css'
])
.pipe(sourcemaps.init())
.pipe(gp_concat('combined.css'))
.pipe(gulp.dest(path.dist))
.pipe(minifyCss({
compatibility: 'ie8',
advanced: false,
keepSpecialComments: '1'
}))
.pipe(rename({
suffix: '.min'
}))
.pipe(sourcemaps.write({
includeContent: false,
sourceRoot: '../styles'
}))
.pipe(gulp.dest(path.dist))
.pipe(browserSync.reload({
stream: true
}))
});