0.0.6 • Published 10 years ago

sass-jspm-importer v0.0.6

Weekly downloads
42
License
MIT
Repository
github
Last release
10 years ago

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.

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago