Skip to content

aaronroberson/node-sass-jspm-importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sass-jspm-importer

This package provides a sass importer function that uses jspm to resolve paths.

npm

Build Status npm version Dependency Status devDependency Status

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.

About

Sass importer that uses jspm to resolve paths

Resources

License

Stars

Watchers

Forks

Packages

No packages published