sass-jspm-importer

0.0.6 • Public • Published

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.

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.

Readme

Keywords

Package Sidebar

Install

npm i sass-jspm-importer

Weekly Downloads

3

Version

0.0.6

License

MIT

Last publish

Collaborators

  • idcware