1.0.0 • Published 5 years ago

node-sass-importer-regex-replace v1.0.0

Weekly downloads
2
License
MIT
Repository
gitlab
Last release
5 years ago

Regex Replaces for Node Sass imports

Allows you to specify regex replacemens for sass @import paths

Installation

npm install node-sass-importer-regex-replace

Usage

According to node-sass documentation (https://github.com/sass/node-sass#importer--v200---experimental) add the importer function to node-sass options

const sass = require('node-sass');
const regexReplaces = require('node-sass-importer-regex-replace');

var result = sass.renderSync({
  data: scss_content
  importer: regexReplaces([
    pattern: /^@test\//, replacement: path.resolve('/path/to/folder/')
  ])
});
1.0.0

5 years ago