# emartech-node-sass-json-importer

> Allows importing json in sass files parsed by node-sass.

Latest version **1.0.5** (published 2015-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install emartech-node-sass-json-importer
pnpm add emartech-node-sass-json-importer
yarn add emartech-node-sass-json-importer
bun add emartech-node-sass-json-importer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2015-10-27 |
| First published | 2015-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | dgyenes |
| Keywords | sass, node-sass, importer, json |

## Links

- npm: https://www.npmjs.com/package/emartech-node-sass-json-importer
- Repository: https://github.com/emartech/node-sass-json-importer
- Homepage: https://github.com/emartech/node-sass-json-importer#readme
- Issues: https://github.com/emartech/node-sass-json-importer/issues
- npm.io page: https://npm.io/package/emartech-node-sass-json-importer

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [is-there](https://npm.io/package/is-there.md) ^4.0.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.5 (latest) — 2015-10-27
- 1.0.4 — 2015-10-27
- 1.0.3 — 2015-10-27
- 1.0.2 — 2015-10-27
- 1.0.1 — 2015-10-27
- 1.0.0 — 2015-10-27

## README

# node-sass-json-importer [![build status](https://travis-ci.org/Updater/node-sass-json-importer.svg?branch=master)](https://travis-ci.org/Updater/node-sass-json-importer)
JSON importer for [node-sass](https://github.com/sass/node-sass). Allows `@import`ing `.json` files in Sass files parsed by `node-sass`.

## Usage
This module hooks into [node-sass's importer api](https://github.com/sass/node-sass#importer--v200---experimental).

```javascript
var sass = require('node-sass');
var jsonImporter = require('node-sass-json-importer');

// Example 1
sass.render({
  file: scss_filename,
  importer: jsonImporter,
  [, options..]
}, function(err, result) { /*...*/ });

// Example 2
var result = sass.renderSync({
  data: scss_content
  importer: [jsonImporter, someOtherImporter]
  [, options..]
});
```

### [sass-loader](https://github.com/jtangelder/sass-loader)

```javascript
import jsonImporter from 'node-sass-json-importer';

...
// Webpack config
{
  sassLoader: {
    importer: jsonImporter
  }
}
```

## Thanks to
This module is based on the [sass-json-vars](https://github.com/vigetlabs/sass-json-vars) gem, which unfortunately isn't compatible with `node-sass`.

---
_Source: https://npm.io/package/emartech-node-sass-json-importer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
