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
1 answer

Gulpfile.coffee not working

I started a project a couple of weeks ago and my gulpfile was working just fine. I have some time today so I thought I would continue working on my project, however I've noticed that all of my gulp files are not working. I'm not getting any errors…
London804
  • 1,072
  • 1
  • 22
  • 47
0
votes
1 answer

Gulp sass task not building properly

After I clone my team's repo on my local machine, I cannot get gulp to work properly. While gulp itself performs all tasks as it is supposed to, I get the following rails error in the browser: Invalid CSS after "": expected selector, was…
Petr Gazarov
  • 3,602
  • 2
  • 20
  • 37
0
votes
2 answers

ASP.NET 5 Publish to Azure Gulp libass error

I have an asp.net 5 website (using gulp and gulp-sass) I'm working on but whenever I try to publish to my Azure website I get the following error DNU(0,0): Error : Thelibsassbinding was not found in…
0
votes
3 answers

Ionic Setup Sass is giving me errors

I have researched all over the place trying to find a solution. I am on Windows 10. I am unable to run "ionic setup sass". Here are the errors I receive when I run it as administrator. Ionic project ready to use Sass! * Customize the app using…
0
votes
1 answer

Gulp Sass Import Paths Incorrect

I am having an issue with my gulp build file with the sass imports. I am using gulp-importify to create a build.scss file that has the proper order of my dependencies, third party css, and my custom css. The Importify task module.exports =…
Miura-shi
  • 4,409
  • 5
  • 36
  • 55
0
votes
1 answer

gulp : how to shorten destination folder of an unknow source?

i recently tried to play with gulp a little bit and i'd like to use it to compile multiple sass files into one. So here's my task : gulp.task('dev', function () { return gulp .src('vendor/proj/**/**/src/assets/scss/dev.scss') …
Jorel Amthor
  • 1,264
  • 13
  • 38
0
votes
1 answer

Gulp-sass breaks when changes are made to imported file

I am using gulp-sass to compile sass. I have main.scss and grid.scss in the same directory. main.scss is watched by gulp watch. grid.scss is imported to main.scss and compiles without errors when main.scss is saved. The problem is when I make…
Muhammet
  • 3,288
  • 13
  • 23
0
votes
1 answer

Elixir sass not working with @imports

I have a main entry point called frontend.scss, which has a few @imports.. usual stuff. When I run gulp, they all compile fine. But when I run gulp watch, it only sees changes in the main entry point (frontend.scss) and not any of the @imports. Is…
Bravi
  • 713
  • 2
  • 8
  • 29
0
votes
1 answer

Bootstrap-sass is outputting calls to font-path

When ever I compile using gulp-sass on node the following scss @import "_bootstrap-sprockets"; @import "_bootstrap"; I get this in the output src: url(font-path("bootstrap/glyphicons-halflings-regular.eot")); However, the font-path thing isn't in…
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
0
votes
1 answer

SASS - Modify class pseudo

To be honest, my title for this question is really not very descriptive. It's so hard to put into words what I need to do, but I think it's a pretty common use-case, so maybe code is the best way to describe. What I need to…
Kevin Nagurski
  • 1,889
  • 11
  • 24
0
votes
1 answer

Gulp-sass flow (importing and mixins)

I've been using Prepros lately which performs some magic automatically, decided to move to Gulp and I'm in trouble, I guess. I have multpiple scss files such as: mixins.scss (here I store all the mixins) variables.scss (variables here) colors.scss…
Wordpressor
  • 7,173
  • 23
  • 69
  • 108
0
votes
2 answers

Run gulp watch command forever

gulp.task('css', function () { gulp.src('custom_css/sass/style.scss') .pipe(sass({ style: 'compressed' })) .pipe(gulp.dest('./public/css/')); }); gulp.task('watch', function() { …
HKumar
  • 1,535
  • 3
  • 13
  • 28
0
votes
0 answers

'node' is not recognized as an internal or external command... during an npm install

Totally new to node.js/npm, trying to get a couple new front-end tools under my belt. I'm on a windows box. I can do: D:\Users\saturdayplace\Documents\www\accntr>node -v v4.1.2 D:\Users\saturdayplace\Documents\www\accntr>which node C:\Program…
saturdayplace
  • 8,370
  • 8
  • 35
  • 39
0
votes
1 answer

Installing gulp-sass - node is not recognized

i'm developing an application using nodejs and npm. I have Windows 10 and i'm using npm v.3.3.7 and node v.4.1.2. To set them up i go through the next steps: Install NodeJs with npm Download Npm-master 3.3.7 from git and overwrite folder…
Bilias7
  • 129
  • 3
  • 12
0
votes
1 answer

Gulp not compiling scss to correct folder

when running gulp watch it appears that its watching as the file changes. However it appears that its writting the .css file to the same folder where I am making the changes. Here is my Gulp File. I want it to put the .min.css and the .css file…
phelix
  • 23
  • 3