Gulp Sass - How to properly name the output css?
gulp-sass
doesn't take any file name parameters. Use gulp-rename
to rename your files. If you have more than one .navbar.scss
files you want to concatenate into one navbar.css
files, feel free to use gulp-concat
. This one takes a file name parameter :-)
Install gulp-rename
with npm install gulp-rename --save-dev
var rename = require('gulp-rename');
return gulp.src('assets/css/sass/**/*/*.navbar.scss')
.pipe(sass())
.pipe(rename('navbar.css'))
.pipe(gulp.dest('assets/css');
or
Install gulp-concat
with npm install gulp-concat --save-dev
var concat = require('gulp-concat');
return gulp.src('assets/css/sass/**/*/*.navbar.scss')
.pipe(sass())
.pipe(concat('navbar.css'))
.pipe(gulp.dest('assets/css');
gulp-sass modifying generated filename (style.css)
Try gulp-rename - looks pretty easy.
Output the line number from the SCSS file in compiled CSS with gulp-sass
Yes it is possible you need to pass it the right options:
.pipe(sass({
sourceComments: 'map',
sourceMap: 'sass',
outputStyle: 'nested'
}))
Gulp 4 compilling scss creates empty css file, but sass compiles correctly
Resolved: It turns out that only style block that had some property was commented, thus causing .scss file return empty output, and sass won't compile empty blocks.
Related Topics
Bootstrap Input Group with Text Select and Button
Divide Width of Element Between Child Divs with CSS
Creating 3 Perfectly Equal Columns That Take Up 100% on The Browser Window Width
Overriding Styles in Semantic UI React
Regression Testing for Styling and Layout of Web Applications
Responsive CSS - Target 1024 X 768 Screen Size Only
Text-Align: -Webkit-Center Vs Text-Align: Center
Text-Decoration: Underline Vs Border-Bottom
Creating Seamless Rotated Background Image
White to Transparent Gradient with Background Image
Considerations for CSS3 Transition Performance
CSS: Define Media Query Within One Class
Bootstrap Container-Fluid - Remove Margins The Right Way (Overflow)
How to Use CSS Variables in Twitter-Bootstrap 4 $Theme-Colors Array
How to Restrict Character Limit by Line or # of Characters with CSS