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'