# postcss-ast-dependencies

> Inspects postcss ASTs for dependency identifiers

Latest version **1.1.0** (published 2016-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-ast-dependencies
pnpm add postcss-ast-dependencies
yarn add postcss-ast-dependencies
bun add postcss-ast-dependencies
```

## 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.1.0 |
| Published | 2016-03-15 |
| First published | 2016-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mark Finger |
| Maintainers | markfinger |

## Links

- npm: https://www.npmjs.com/package/postcss-ast-dependencies
- Repository: https://github.com/markfinger/postcss-ast-dependencies
- Homepage: https://github.com/markfinger/postcss-ast-dependencies#readme
- Issues: https://github.com/markfinger/postcss-ast-dependencies/issues
- npm.io page: https://npm.io/package/postcss-ast-dependencies

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.5.0
- [css-selector-tokenizer](https://npm.io/package/css-selector-tokenizer.md) ^0.5.4

## Recent versions

- 1.1.0 (latest) — 2016-03-15
- 1.0.1 — 2016-02-22
- 1.0.0 — 2016-02-22
- 0.0.1 — 2016-02-01

## README

# postcss-ast-dependencies

Inspects postcss ASTs for dependency identifiers.


## Install

`npm install --save postcss-ast-dependencies`


## Example

```js
import postcss from 'postcss';
import postcssAstDependencies from 'postcss-ast-dependencies';

const ast = postcss.parse(`
  @import './foo.css';

  .bar {
    background-image: url('./bar.png');
  }
`);

const deps = postcssAstDependencies(ast);

console.log(deps.map(dep => dep.source);
// ['./foo.css', './bar.png']
```


## Notes

Lists of objects are returned, where each object has the value
of the identifier as a `source` prop. Rather than simply returning
lists of strings, we use objects as it leaves open the potential
for more contextual information to be provided in a
backwards-compatible manner.

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