Gulp BootstrapCSS源图

时间:2015-04-20 13:45:17

标签: javascript css gulp source-maps gulp-sourcemaps

我尝试通过CSS Source Mapgulp.js库生成以下BootstrapCSS个文件。

我的吞咽任务如下:

bower = require' main-bower-files' sourcemaps = require' gulp-sourcemaps' cssmin = require' gulp-minify-css' gulpFilter = require' gulp-filter'

gulp.task 'compileVendorLibraries', ->
    cssFilter = gulpFilter(['**/*.css'])
    gulp.src bower()
    .pipe cssFilter
    .pipe gulp.dest(dist.css + 'css')
    .pipe sourcemaps.init()
    .pipe rename({suffix: ".min"})
    .pipe cssmin()
    .pipe sourcemaps.write()
    .pipe cssFilter.restore()

index.html我有:

<link href="app/stylesheets/css/bootstrap.min.css" rel="stylesheet" type="text/css">

然而,我没有得到&#34;原作&#34; Chrome中的bootstrap.css文件(源地图已激活)

然而,当我按照以下方式为我的自定义.less文件执行此操作时,我得到了我的原始&#34; styles.less&#34;文件:

gulp.src sources.less
    .pipe sourcemaps.init()
    .pipe less()
    .on 'error', swallowError
    .pipe cssmin()
    .pipe sourcemaps.write()
    .pipe gulp.dest dist.css + 'css'

0 个答案:

没有答案