Answer the question
In order to leave comments, you need to log in
Gulp + compass without ruby, is it possible on libsass?
There is node-sass, how can I use it in gulp? I don't want to install ruby just for this purpose.
It seems that there is gulp-sass, which just works through libsass, but how to use compass in it and is it possible? I found such an example, it seems, by analogy, is it possible to compass? but not sure if this is correct:
var gulp = require('gulp');
var sass = require('gulp-sass');
var handleErrors = require('../util/handleErrors');
var sourcemaps = require('gulp-sourcemaps');
var minifyCSS = require('gulp-minify-css');
//libsass
gulp.task('sass', function () {
return gulp.src('./frontend/sass/style.scss')
.pipe(sourcemaps.init())
.pipe(sass({
includePaths: [
'./node_modules/susy/sass' //required for sass
]
}))
//.pipe(minifyCSS()) //move to prod settings
.pipe(sourcemaps.write('./app/www/css')))
.pipe(gulp.dest('./app/www/css'))
});
This is answer for sass files (not scss). Please always differentiate them
Run in shell
bower install compass-sass-mixins
Edit your sass file
@import "bower_components/compass-sass-mixins/lib/compass"
or
Run in shell
npm i compass-sass-mixins
Edit your sass file
@import "node_modules/compass-sass-mixins/lib/compass"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question