Questions tagged [gulp-sass]

a gulp plugin for compilation of Sass to CSS.

gulp-sass is a gulp plugin for compilation of Sass files to CSS files.

Basic example of usage:

var gulp = require('gulp');
var sass = require('gulp-sass');

gulp.task('sass', function () {
  gulp.src('./sass/**/*.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.dest('./css'));
});

The plugin can also be used with gulp-sourcemaps:

var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('sass', function () { 
  gulp.src('./sass/*.scss')
    .pipe(sourcemaps.init())
    .pipe(sass())
    .pipe(sourcemaps.write('./sourcemaps'))
    .pipe(gulp.dest('./css'));
});

gulp-sass accepts node-sass compatible options, e.g.:

var gulp = require('gulp');
var sass = require('gulp-sass');

gulp.task('sass', function () {
  gulp.src('./sass/**/*.scss')
    .pipe(sass({ outputStyle: 'compressed' }))
    .pipe(gulp.dest('./css'));
});
718 questions
0
votes
0 answers

SASS stripping out -moz-box-sizing

I am using gulp to run a build command which compiles my SASS files. When I compile these SASS files locally, they are fine, but when I compile them on my server, SASS strips out all -moz-box-sizing styles. Are there any settings in SASS what…
tgrux
  • 103
  • 3
  • 8
-1
votes
0 answers

Gulp - scss => css / compile issue

I have a problem compiling a file from scss to css. This is the first time I'm using GULP - and I think there's something wrong with the file path. I made a lot of solutions, but no one of them was ok. Am I doing it right? I try many solutions and…
Mateusz
  • 1
  • 1
-1
votes
2 answers

How to overwrite Bootstrap 4.5 SASS variables and use them in SCSS files

I am attempting to move all of my CSS files into SCSS files so I can use Bootstrap 4.5 theming to style my site. I previously had some of it working, but once I switched the CSS to SCSS and tried to use custom $theme-color and $color map variables,…
Josh
  • 57
  • 2
  • 9
-1
votes
1 answer

Install npm and gulp in docker4drupal

I am working on an existing project that was built by Droopler distribution and docker4drupal. As per Droopler distribution documentation, it requires npm and gulp to compiled sass easily and docker4drupal don't have it by default. I tried to…
usmanjutt84
  • 283
  • 4
  • 18
-1
votes
2 answers

How to Solve Gulp 4.0 Errors?

I'm setting up gulp.js file for gulp 4.0 but I'm facing lots of errors. I'm new to gulp 4.0 and not familiar with new syntax. I tried many solution from different Sites But didn't worked for me. below is my gulp,js file code. Please Help me to find…
-1
votes
1 answer

How can i lint my styles by using gulp-sass and gulp-stylelint

I have several SASS files that should be compiled separately. I want to lint theirs and also theirs "imports" I have some sass files: // style.scss @import "./styles/a.scss"; body { background-color: #FFF; } // styles/a.scss h1 { …
ilya
  • 31
  • 7
-1
votes
1 answer

How to install gulp via NPM?

Following this tutorial to set up app. It seems pretty normal and standard compared to all of the other tutorials that I have found. However, when tried and complete the 1.2.3 step Create a gulpfile.js at the root of the project: I am getting this…
Keet
  • 39
  • 3
-1
votes
1 answer

How can I get bootstrap classes to work in reactjs app?

I have npminstalled bootstrap-sass "^3.3.7", and reactjs. Is this enough to work with the BS classes like 'well' for example? This is part of my component: render() { return (
hi from well …
bier hier
  • 13,692
  • 28
  • 72
  • 140
-1
votes
3 answers

gulp sass sourcemaps and autoprefixer not working

I am unable to get the autoprefixer working with gulp sass. Here is my gulpfile.js: 'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var autoprefixer =…
JS dev
  • 8,456
  • 12
  • 68
  • 111
-1
votes
2 answers

bootstrap glyphicons are not working in wordpress theme

I made a website using a yeoman-generator webapp,bootstrap and sass. the site is built and everything was working fine but when i tried to make the site into a WordPress theme the glyphicons stopped showing.So i checked and the src path to the…
-1
votes
1 answer

File css with 0kb in gulp

My gulp save the css width 0kb. This is my code https://jsfiddle.net/v6y0qkux/ gulp.task('jpg', function () { gulp.src('./template/img/**/*.*') .pipe(changed('./dist/img/')) .pipe(imagemin({ …
concas
  • 99
  • 3
-2
votes
1 answer

Error: Cannot find module 'camelcase'

I'm trying to run a gulp based application. On Ubuntu, everything is working, but on Debian server not. Ubuntu: npm: 5.3.0, nodejs: v8.2.1, bower@1.8.0, gulp-cli@1.4.0, npm@5.3.0 Debian: npm: 5.3.0, nodejs: v8.2.1, bower@1.8.0, gulp-cli@1.4.0,…
jpyzio
  • 352
  • 1
  • 3
  • 12
-3
votes
1 answer

dest.on is not a function in gulp tasks

I'm trying to make gulp tasks but after initializing gulp and work in coding I got this error below, in sass and pug tasks what I understand the problem is on pipe() and I checked the Docs I can't see something wrong in my code gulpfile.js the…
Ahmed Fouad
  • 60
  • 1
  • 6
1 2 3
47
48