node-sass-importer-regex-replace

1.0.0 • Public • Published

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/')
  ])
});

Package Sidebar

Install

npm i node-sass-importer-regex-replace

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

3.47 kB

Total Files

5

Last publish

Collaborators

  • lumnn