1.1.1 • Published 7 years ago

@mightyplow/sass-dedup-importer v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
7 years ago

sass-dedup-importer

An importer function which can be used with node-sass. It ensures that multiple import statements in sass/scss files get only imported once.

Installation

npm i -D @mightyplow/sass-dedup-importer

Usage

Note

The function only takes the filenames into account, since for now I cannot resolve the original paths in a reliable way. So make sure, the filenames are unique.

cli

node-sass --importer node_modules/@mightyplow/sass-dedup-importer/importer.js ...

node

In node you can just pass the importer function to the node-sass options. To use the importer in your build tool please read its documentation on how to pass options to node-sass.

const sass = require('node-sass');
const importer = require('@mightyplow/sass-dedup-importer');
 
sass.render({
    ...
    importer: importer
    ...
1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago