1

Need assistance with getting gulp/gulp-sass to recognize susy. Im running out of ideas and need a 2nd set of eyes. Thank you for feedback.

Error:

[gulp] [gulp-sass] source string:1: error: file to import not found or unreadable: "susy"

gem list

rubygems-update (2.2.2)
rubyzip (1.0.0)
rvm (1.11.3.8)
sass (3.3.7)
selenium-webdriver (2.37.0)
slop (3.4.6)
sorcerer (1.0.2)
susy (2.1.2)

Config.rb

require 'susy'

Gemfile

source 'https://rubygems.org'
gem 'susy'

Gulp

var paths = {
sass: ['sass/main.scss'],
scripts: ['js/vendor/jquery-1.11.0.min.js', 'js/*.js'],
images: 'img/**/*'
};
// Styles
gulp.task('styles', function() {
    return gulp.src(paths.sass)
    .pipe(sass({errLogToConsole: true}))
    .pipe(gulp.dest('css'))
    .pipe(rename({ suffix: '.min' }))
    .pipe(minifycss())
    .pipe(gulp.dest('css'))
    .pipe(notify({ message: 'Styles task complete' }));
});
4

1 回答 1

3

切换到 gulp-ruby-sass 并按照以下配置解决了该问题:

gulp.task('styles', function() {
   return gulp.src(paths.sass)
    .pipe(sass({require: ['susy']}))
    .pipe(gulp.dest('css'))
    .pipe(rename({ suffix: '.min' }))
    .pipe(minifycss())
    .pipe(gulp.dest('css'))
    .pipe(notify({ message: 'Styles task complete' }));
});
于 2014-05-23T02:02:06.603 回答