# stylecow-core

> Stylecow core library

Latest version **2.5.0** (published 2017-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install stylecow-core
pnpm add stylecow-core
yarn add stylecow-core
bun add stylecow-core
```

## 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.5.0 |
| Published | 2017-08-02 |
| First published | 2015-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Oscar Otero |
| Maintainers | oscarotero |
| Keywords | css, parser, processor, sourcemap |

## Links

- npm: https://www.npmjs.com/package/stylecow-core
- Repository: https://github.com/stylecow/stylecow-core
- Issues: https://github.com/stylecow/stylecow-core/issues
- npm.io page: https://npm.io/package/stylecow-core

## Dependencies (2)

- [source-map](https://npm.io/package/source-map.md) ^0.5.*
- [multi-stage-sourcemap](https://npm.io/package/multi-stage-sourcemap.md) ^0.2.1

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.5.0 (latest) — 2017-08-02
- 2.4.2 — 2016-12-13
- 2.4.1 — 2016-11-06
- 2.4.0 — 2016-09-21
- 2.3.1 — 2016-07-15
- 2.3.0 — 2016-03-24
- 2.2.2 — 2015-11-19
- 2.2.1 — 2015-11-14
- 2.2.0 — 2015-11-13
- 2.1.1 — 2015-11-07
- 2.1.0 — 2015-10-22
- 2.0.2 — 2015-10-09
- 2.0.1 — 2015-09-19
- 2.0.0 — 2015-09-16
- 1.1.1 — 2015-07-28
- … 4 more at https://npm.io/package/stylecow-core/versions

## README

# Stylecow core

Fast and furious css processor. For node >= v4.0

[![Build Status](https://travis-ci.org/stylecow/stylecow-core.svg?branch=master)](https://travis-ci.org/stylecow/stylecow-core)

* [See the wiki](https://github.com/stylecow/stylecow-parser/wiki) for more documentation
* [Stylecow home page](http://stylecow.github.io/)

Simple usage example:

```javascript
"use strict";

let stylecow = require('stylecow-core');

//Create a Tasks instance and add some stuff
let tasks = (new stylecow.Tasks())

	//minimum browser support
	.minSupport({
		explorer: 9,
		firefox: 30,
		chrome: 30,
		safari: 6,
		ios: 6,
		opera: 12
	})

	//add some plugins
	.use(require('stylecow-plugin-prefixes'))
	.use(require('stylecow-plugin-nested-rules'))
	.use(require('stylecow-plugin-color'))

	//custom tasks
	.addTask({
		filter: {
			type: 'Keyword',
			name: 'grey'
		},
		fn: keyword => keyword.name = 'gray'
	});

//Create a Coder instance to minify the css code
let coder = new stylecow.Coder('minify');

//Parse a css file
let css = stylecow.parseFile('styles.css');

//Execute the tasks
tasks.run(css);

//Get the minified code
let code = coder.run(css);

console.log(code.css);
```

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