This package provides a sass importer function that uses jspm to resolve paths.
var sassJspm = require('sass-jspm-importer');
gulp.task('build-sass', function() {
return gulp.src('src/sass/*.scss')
.pipe(sass({
errLogToConsole: true,
functions: sassJspm.resolve_function('/lib/'),
importer: sassJspm.importer
}))
.pipe(gulp.dest('dist/css'));
});
Where /lib/
is the path to your jspm_packages
folder in your document root.
$fa-font-path: jspm_resolve("font-awesome/fonts/");
@import "jspm:font-awesome/scss/font-awesome";
// do fun stuff with font-awesome !
The jspm:
-prefixed imports will be handled by the custom importer.