Skip to content

Commit

Permalink
some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Feb 28, 2017
1 parent 3342dff commit 0923082
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ console.log(minifiedCss);

Minify `source` CSS passed as `String`.

Returns an object with properties:

- css `String` – resulting CSS
- map `Object` – instance of [`SourceMapGenerator`](https://github.com/mozilla/source-map#sourcemapgenerator) or `null`

```js
var result = csso.minify('.test { color: #ff0000; }', {
restructure: false, // don't change CSS structure, i.e. don't merge declarations, rulesets etc
Expand All @@ -85,6 +80,11 @@ console.log(result.css);
// > .test{color:red}
```

Returns an object with properties:

- css `String` – resulting CSS
- map `Object` – instance of [`SourceMapGenerator`](https://github.com/mozilla/source-map#sourcemapgenerator) or `null`

Options:

- sourceMap
Expand Down Expand Up @@ -137,10 +137,14 @@ console.log(result.css);

### compress(ast[, options])

Does the main task – compress AST.
Does the main task – compress an AST.

> NOTE: `compress()` performs AST compression by transforming input AST by default (since AST cloning is expensive and needed in rare cases). Use `clone` option with truthy value in case you want to keep input AST untouched.
Returns an object with properties:

- ast `Object` – resulting AST

Options:

- restructure
Expand Down

0 comments on commit 0923082

Please sign in to comment.