0

I need to connect node-refills to gulp. This code gives an error:

var 
    gulp = require('gulp'),
    sass = require('gulp-sass'),
    bourbon = require('node-bourbon').includePaths,
    bitters = require('bourbon-bitters').includePaths,
    neat = require('bourbon-neat').includePaths,
    refills = require('node-refills').includePaths,
    normalize = require('node-normalize-scss').includePaths;

gulp.task('sass', function () {
    return gulp.src('app/sass/**/*.sass')
    .pipe(sass({
        includePaths: [].concat(normalize, bourbon, bitters, neat, refills),
    }))
    .pipe(gulp.dest('app/css'))
    .pipe(browserSync.reload({stream: true}))
});

In sass file:

@import "normalize"
@import "bourbon"
@import "neat"
@import "bitters"
@import "refills"

Sorry for my English )

Angeli
  • 1

1 Answers1

0

What is the error that you’re getting?

I recommend not using Bitters or Refills as npm modules, because they are not libraries like Bourbon and Neat are. Bitters and Refills are code scaffolds and snippets meant to be added as static files straight to your project and be edited over time to fit your needs. Using them as an API is very fragile.

Finally, I want to note that the Bourbon team has official npm packages for Bourbon and Neat:

The node-bourbon package is not official and is susceptible to falling out of date. bourbon-bitters and node-refills are also not official packages, and they are not designed to be used as a library API, so will not have official packages.

Tyson Gach
  • 266
  • 1
  • 3