G
G
gto61202017-06-17 13:23:17
gulp.js
gto6120, 2017-06-17 13:23:17

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'))
});

I also found this example, where it is recommended to simply install via bower and take mixins, but this is also not a fashionable requirement for a lib:
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"

For example, I also need susy

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question