sass-jspm-importer
v0.0.6
Published
jspm importer module for node-sass
Downloads
21
Readme
sass-jspm-importer
This package provides a sass importer function that uses jspm to resolve paths.
Usage
Gulp Task
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.
In Sass
$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.
Please note that the jspm:
prefix is just there to indicate that you want this import resolved through jspm, it's not refering to the jspm registry.