Skip to content

Commit

Permalink
improved docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kaviththiranga committed Dec 15, 2012
1 parent bfb436a commit 7bd7995
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docs/manual/en-US/chapters/packages/media.md
Expand Up @@ -14,7 +14,7 @@ Abstract class `JMediaCompressor` contains functions to compress contents of a f
*Example* : How to obtain a `JMediaCompressorJs` object for javascript files and compress content.

```php
$file = __DIR__ . test.js
$file = __DIR__ . 'test.js';

// Options for compressor
$options = array('type' => 'js', 'REMOVE_COMMENTS' => true);
Expand All @@ -36,7 +36,7 @@ Abstract class `JMediaCompressor` contains functions to compress contents of a f
Example : How to use JMediaCompressor::compressString()

```php
$file = __DIR__ . test.css;
$file = __DIR__ . 'test.css';

// Options for compressor
$options = array('type' => 'css', 'REMOVE_COMMENTS' => true);
Expand All @@ -49,9 +49,9 @@ Example : How to use JMediaCompressor::compressFile()

```php

$file = __DIR__ . test.css;
$file = __DIR__ . 'test.css';

$destinationFile = __DIR__ . test.min.css;
$destinationFile = __DIR__ . 'test.min.css';

// Options for compressor
$options = array('REMOVE_COMMENTS' => true, 'overwrite' => true);
Expand All @@ -60,7 +60,15 @@ Example : How to use JMediaCompressor::compressFile()

```

##### Available options for compressors.

- REMOVE_COMMENTS : boolean :- Defines whether to remove comments or not
- overwrite : boolean :- To define whether to overwrite if destination file already exists (Only needs when using compressFile())

specific options to `JMediaCompressorCss`

- MIN_COLOR_CODES : boolean :- To define whether try to compress HTML Color codes
- LIMIT_LINE_LENGTH : boolean :- To define whether to break compressed content in to few lines

#### JMediaCollection

Expand Down

0 comments on commit 7bd7995

Please sign in to comment.