0

I'm trying to generate the following CSS Source Map files, through gulp.js for the BootstrapCSS library.

My gulp task is as folows:

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()

And in index.html I have:

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

However, I dont get the "original" bootstrap.css file in Chrome (source maps are activated)

Whereas when I do it for my custom .less files as follows, I get the my original "styles.less" file:

gulp.src sources.less
    .pipe sourcemaps.init()
    .pipe less()
    .on 'error', swallowError
    .pipe cssmin()
    .pipe sourcemaps.write()
    .pipe gulp.dest dist.css + 'css'
ChrisGeo
  • 3,807
  • 13
  • 54
  • 92
  • Is your gulp task complete? I'm missing the part where you store bootstrap.min.css. Also, I'm wondering if you want to create a sourcemap out of the newly saved bootstrap.css. If so, that won't work as you would have to change your source after the save. – ddprrt Apr 20 '15 at 15:40
  • And another one: Where does your Chrome think the sourcemap is? $stdin? – ddprrt Apr 20 '15 at 16:34

0 Answers0