I'm reading a tutorial about sass here then I tried some other approach and I cant get the answer in this tutorial. Theres the problem. I have this code in my gulpfile.js
gulp.task('compileNavbar', function() {
gulp.src('assets/css/sass/**/*.navbar.scss')
.pipe(sass('navbar.css'))
.pipe(gulp.dest('assets/css/'));;
});
As of now, I only have assets/css/sass/guest.navbar.scss and this code locates the scss files correctly and puts the output css file in the correct directory BUT the css is named as guest.navbar.css which I didnt expect. I want it to be named as navbar.css but how to?
gulp-sass
doesn't take any file name parameters. Usegulp-rename
to rename your files. If you have more than one.navbar.scss
files you want to concatenate into onenavbar.css
files, feel free to usegulp-concat
. This one takes a file name parameter :-)Install
gulp-rename
withnpm install gulp-rename --save-dev
or
Install
gulp-concat
withnpm install gulp-concat --save-dev