<commit_before># AssetCompressor

Inspired by ShawnMcCool's closure-compiler bundle, I started adding on to his code until the AssetCompressor was born.
closure-compiler (and readme.md) credits go to ShawnMcCool & friends =)

AssetCompressor is installable via the Artisan CLI:

    php artisan bundle:install assetcompressor

**Important:** Closure Compiler requires that Java is installed.  Consequently, it can run on virtually any operating system.

### Description

This bundle automatically minifies a site's Assets (JS / CSS) and updates them only when necessary.


### 1. Bundle Registration

Add 'assetcompressor' to your **application/bundles.php** file:

    return array(
        'assetcompressor' => array(
            'auto' => true
        )
    );

### 2. Configuration

This bundle assumes that the Java binary is available and already in your PATH.  This is almost always the case.  If --for whatever reason-- you need to specify the absolute path to the binary, you can do so in the java_binary_path_overrides array().  You can add as many paths as you'd like and may mix and match paths for different operating systems.  Invalid paths will simply be ignored.

### 3. Triggering Minification

Uncomment the 'Asset' alias in **application/config/application.php** and add the following line to it.

    'Asset'      => 'AssetCompressor\\Asset',


### License

The AssetCompressor bundle is released under the MIT license.

The Google Closure Compiler has been included in this package (in the drivers/closure-compiler directory).  It is important to note that the Closure Compiler has been released under the Apache License, Version 2.0.

More information can be found here: [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)<commit_msg>Updating README<commit_after># AssetCompressor

Inspired by ShawnMcCool's closure-compiler bundle, I started adding on to his code until the AssetCompressor was born.
closure-compiler (and readme.md) credits go to ShawnMcCool & friends =)

AssetCompressor is installable via the Artisan CLI:

    php artisan bundle:install assetcompressor

**Important:** Closure Compiler requires that Java is installed.  Consequently, it can run on virtually any operating system.

### Description

This bundle automatically minifies a site's Assets (JS / CSS) and updates them only when necessary.


### 1. Bundle Registration

Add 'assetcompressor' to your **application/bundles.php** file:

    return array(
        'assetcompressor' => array(
            'auto' => true
        )
    );

### 2. Configuration

This bundle assumes that the Java binary is available and already in your PATH.  This is almost always the case.  If --for whatever reason-- you need to specify the absolute path to the binary, you can do so in the java_binary_path_overrides array().  You can add as many paths as you'd like and may mix and match paths for different operating systems.  Invalid paths will simply be ignored.

### 3. Triggering Minification

Uncomment the 'Asset' alias in **application/config/application.php** and add the following line to it.

    'Asset'      => 'AssetCompressor\\Asset',

### 4. Laravel "bug" workaround

The Asset_Container class is in laravel/asset.php file. Therefore, it cannot be extended without adding this to **application/start.php**

Autoloader::map(array(
    'Laravel\\Asset_Container' => path('sys').'asset.php'
));

I told Taylor about this and he will fix it soon ;)

### License

The AssetCompressor bundle is released under the MIT license.

The Google Closure Compiler has been included in this package (in the drivers/closure-compiler directory).  It is important to note that the Closure Compiler has been released under the Apache License, Version 2.0.

More information can be found here: [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
{'fraction_non_alphanumeric': 0.07875833760903027, 'fraction_numerical': 0.0048742945100051305, 'mean_word_length': 4.024484536082475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4835583', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1006, 'n_words': 480}