Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kylekatarnls/node-sass-tilde-importer
A node-sass custom importer which turns ~ into absolute paths to the nearest parent node_modules directory.
https://github.com/kylekatarnls/node-sass-tilde-importer
Last synced: 2 days ago
JSON representation
A node-sass custom importer which turns ~ into absolute paths to the nearest parent node_modules directory.
- Host: GitHub
- URL: https://github.com/kylekatarnls/node-sass-tilde-importer
- Owner: kylekatarnls
- License: mit
- Fork: true (matthewdavidson/node-sass-tilde-importer)
- Created: 2019-01-22T13:55:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-02-13T16:15:51.000Z (over 5 years ago)
- Last Synced: 2024-05-01T12:22:49.245Z (5 months ago)
- Language: JavaScript
- Size: 128 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# node-sass-tilde-importer
> A node-sass custom importer which turns `~` into absolute paths to the nearest parent `node_modules` directory.
[![Latest Stable Version](https://img.shields.io/npm/v/@kylekatarnls/node-sass-tilde-importer.svg?style=flat-square)](https://www.npmjs.com/package/@kylekatarnls/node-sass-tilde-importer)
[![Build Status](https://img.shields.io/travis/kylekatarnls/node-sass-tilde-importer.svg?style=flat-square)](https://travis-ci.org/kylekatarnls/node-sass-tilde-importer)
[![StyleCI](https://styleci.io/repos/167003001/shield?style=flat-square)](https://styleci.io/repos/167003001)
[![codecov.io](https://img.shields.io/codecov/c/github/kylekatarnls/node-sass-tilde-importer.svg?style=flat-square)](https://codecov.io/github/kylekatarnls/node-sass-tilde-importer?branch=master)## Install
```sh
npm install @kylekatarnls/node-sass-tilde-importer --save-dev
```## Usage
```js
var sass = require('node-sass');
var tildeImporter = require('@kylekatarnls/node-sass-tilde-importer');var result = sass.renderSync({
data: scss_content,
importer: tildeImporter
});
````node-sass` cli example:
```sh
node-sass style.scss --importer=node_modules/@kylekatarnls/node-sass-tilde-importer
```Please refer to the node-sass [readme](https://github.com/sass/node-sass#readme) for full instruction on how to use custom importers.