# node-sass-import

> Allows recursive import of SCSS components from local and/or node_modules directories using npm's module resolving algorithm

Latest version **2.0.1** (published 2018-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-sass-import
pnpm add node-sass-import
yarn add node-sass-import
bun add node-sass-import
```

## 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 | 2.0.1 |
| Published | 2018-05-08 |
| First published | 2016-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Emmanuel Addo Narh |
| Maintainers | anarh |
| Keywords | node-sass-import, sass, scss, import, require, npm, node, loader, importer |

## Links

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

## Dependencies (6)

- [glob](https://npm.io/package/glob.md) 7.1.2
- [async](https://npm.io/package/async.md) 2.6.0
- [yargs](https://npm.io/package/yargs.md) 11.0.0
- [resolve](https://npm.io/package/resolve.md) 1.5.0
- [path-parse](https://npm.io/package/path-parse.md) 1.0.5
- [path-format](https://npm.io/package/path-format.md) 1.2.1

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2018-05-08
- 2.0.0 — 2018-04-17
- 1.1.1 — 2016-10-24
- 1.1.0 — 2016-10-03
- 1.0.5 — 2016-09-08
- 1.0.4 — 2016-08-17
- 1.0.2 — 2016-07-25
- 1.0.0 — 2016-02-06
- 0.0.9 — 2016-01-31
- 0.0.8 — 2016-01-31
- 0.0.6 — 2016-01-25
- 0.0.3 — 2016-01-25
- 0.0.2 — 2016-01-25

## README

# node-sass-import 

[![npm][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]  [![Coverage Status][coveralls-image]][coveralls-url] [![js-standard-style][standard-image]][standard-url]

Allows recursive import of SCSS components from local and/or node_modules directories using npm's module resolving algorithm. Without the need for tildes(~) to import from node_modules.
Allows usage of `@import "some-sass-npm-module"` akin to `require("some-npm-module")` in node.js

## Install

```sh
$ npm install --save node-sass-import
```

## Usage

Used in conjunction with node-sass. In a simple npm-only build setup, the example below in package.json should suffice.

```json
{
  "name": "your-package",
  "description": "fun package",
  "main": "index.js",
  "scripts": {
    "build-css": "node-sass test.scss dist/test.css --importer node_modules/node-sass-import"
  }
}

```
You can now build your scss files as follows

```sh
$ npm run build-css
```

## Example

@import in sass can now be used just like a require statement. The example below imports the main scss file from the newsapps-syles npm module. At build time, all @import statements will be resolved locally or like npm modules. Also includes import support for partial scss files e.g. _partial.scss

```scss
@import "newsapps-styles";

.some-style {
  color: $primary-blue;
}
```

## API

Version 2+ supports Node 6+ and npm 2+

## License

2016 MIT © [Emmanuel (Manny) Narh]()

[travis-image]: https://travis-ci.org/anarh/node-sass-import.svg?branch=master
[travis-url]: https://travis-ci.org/anarh/node-sass-import
[npm-image]: https://img.shields.io/npm/v/node-sass-import.svg?style=flat
[npm-url]: https://npmjs.org/package/node-sass-import
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: http://standardjs.com/
[coveralls-image]: https://coveralls.io/repos/anarh/node-sass-import/badge.svg?branch=master&service=github
[coveralls-url]: https://coveralls.io/r/anarh/node-sass-import

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