Closed NgYueHong closed 9 years ago
gulp.src([...your assets...], {base: 'public/assets'})
Thanks a lot for your help. It seems working now.
Just spend several hours to figure out that base: 'public/assets' doesn't work for me. For some reason I should provide full path.
gulp.src([...your assets...], {base: 'c:/sources/repo/public/assets'})
I am using gulp-concat-css to combine a selected list of CSS into one. My project folder structure look like this:
Now, my gulp task look something like this:
The problem is the final output come with the wrong url rebase. This cause the CSS URL is pointing to the wrong path of files. For example, the original URL from the
bootstrap.min.css
isurl('../fonts/glyphicons-halflings-regular.woff')
. Now, the combined CSS come with the URL ofurl(../../fonts/glyphicons-halflings-regular.woff)
, which is wrong. It should beurl(../libs/bootstrap/dist/fonts/glyphicons-halflings-regular.woff)
According to gulp-concat-css documentation, it says "for a proper import inlining and url rebase, make sure you set the proper base for the input files".
How can I set the proper base for the input files to get the correct url rebase?