# grunt-style-extract

> Extract properties from CSS files.

Latest version **1.0.1** (published 2016-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-style-extract
pnpm add grunt-style-extract
yarn add grunt-style-extract
bun add grunt-style-extract
```

## 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.1 |
| Published | 2016-04-07 |
| First published | 2016-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | anpsthemes |
| Maintainers | anpsthemes |
| Keywords | extract, CSS, grunt |

## Links

- npm: https://www.npmjs.com/package/grunt-style-extract
- Repository: https://github.com/anpsthemes/grunt-style-extract
- Issues: https://github.com/anpsthemes/grunt-style-extract/issues
- npm.io page: https://npm.io/package/grunt-style-extract

## Dependencies (1)

- [style-extract](https://npm.io/package/style-extract.md) ^1.0.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-04-07
- 1.0.0 — 2016-04-07

## README

## What is grunt-style-extract?

Grunt-style-extract is a Grunt version of [style-extract](https://github.com/anpsthemes/style-extract/), which is used for extracting only specific CSS properties and their selectors from CSS files.

## Install

```
npm install grunt-style-extract
```

## Options

* properties: an array of CSS properties, that will be extracted

## Usage

``` javascript
grunt.initConfig({
  ...
  styleExtract: {
    colors: {
      options: {
          'properties': ['color', 'background-color']
      },
      files: {
          'dist/style.css': 'lib/style.css'
      }
    },
  },
  ...
});
```

### Before

``` css
/* Foo */
.foo {
  background-color: #fff;
  color: #000;
  display: block;
  font-size: 12px;
}

/* Bar */
.bar {
  text-align: center;
}
```

### After
``` css
.foo {
  background-color: #fff;
  color: #000;
}
```

## Grunt version
The Gulp version can be found at [grunt-style-extract](https://www.npmjs.com/package/gulp-style-extract).

## Node version
The Node version can be found at [style-extract](https://www.npmjs.com/package/style-extract).

## License

[MIT](http://en.wikipedia.org/wiki/MIT_License)

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