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'));
});
749 questions
0
votes
2 answers

error compiling susy2 with gulp

I have a very simple gulp based test environment using only sass and the susy2 gem - no compass because compass is no longer a dependency of susy 2 The error i'm getting is ...sass/susy/language/susy/settings:8:error: error reading values after…
rakitin
  • 1,943
  • 6
  • 25
  • 51
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
  • 9
-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
  • 97
  • 2
  • 11
-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
  • 353
  • 5
  • 21
-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
  • 51
  • 1
  • 9
-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
  • 20,970
  • 42
  • 97
  • 166
-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 =…
Peter
  • 10,492
  • 21
  • 82
  • 132
-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

How to convert the following CSS into SCSS format?

I'm working on a WordPress page with a new layout I added to Flexible Content Template customer field. I found the .scss file where the styles should be placed in, but not sure how to convert my CSS into .scss format. Below is the CSS I want to…
CodeForGood
  • 767
  • 7
  • 30
-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,…
Jakub Maj
  • 531
  • 2
  • 6
  • 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
49
50