Nanananananananana.. Pat Man!
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

@mightyplow/sass-dedup-importer

1.1.1 • Public • Published

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
    ...

install

npm i @mightyplow/sass-dedup-importer

Downloadsweekly downloads

28

version

1.1.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability