# gulp-sass-import-json

> Gulp plugin for sass

Latest version **1.0.2** (published 2018-03-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install gulp-sass-import-json
pnpm add gulp-sass-import-json
yarn add gulp-sass-import-json
bun add gulp-sass-import-json
```

## 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.2 |
| Published | 2018-03-11 |
| First published | 2015-10-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Renat Gafarov |
| Maintainers | acusticdemon |
| Keywords | gulp, sass, scss, json, import |

## Links

- npm: https://www.npmjs.com/package/gulp-sass-import-json
- Repository: https://github.com/acusticdemon/gulp-sass-import-json
- Issues: https://github.com/acusticdemon/gulp-sass-import-json/issues
- npm.io page: https://npm.io/package/gulp-sass-import-json

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [through2](https://npm.io/package/through2.md) ^0.6.5
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.4

## 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.2 (latest) — 2018-03-11
- 1.0.1 — 2018-02-21
- 1.0.0 — 2017-02-27
- 0.0.5 — 2016-05-04
- 0.0.4 — 2016-05-04
- 0.0.3 — 2015-10-27
- 0.0.2 — 2015-10-21
- 0.0.1 — 2015-10-21

## README

# gulp-sass-import-json

Gulp plugin for sass

## Install
```bash
npm i gulp-sass-import-json
```

## Configuration
### sassImportJson([options])
#### options.isSass
Type: `Boolean`

Set it to `true` if you want to have SCCS syntax. Otherwise it will be Sass syntax.

Default value is `false`.

#### options.cache
Type: `Boolean`

Cache the imported JSON files. Caching makes builds faster. If you have watch tasks and want to reload changes to the JSOn files, you have to use `false`.

Default value is `true`.


## Example
//gulp-build.js
```js
var sassImportJson = require('gulp-sass-import-json');

gulp.src('/path/example.sass')
    .pipe(sassImportJson())//add plugin before sass render
    .pipe(gulp.sass())
```

//example.sass
```sass
@import '_variables.json'

div.error
    color: map-get($colors, error)
    font-size: $medium
```

//_variables.json (JSON: root element must be Object ONLY!)
```json
{
    "colors": {
        "error": "#f00",
        "success": "#0f0"
    },
    "medium": "12px"
}
```

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