<commit_before>web.optimization
================

Implementations of System.Web.Optimization.IBundleTransformer to enhance the Bundling and Minification support in .Net

Uses Chrome V8 engine as packaged in ClearScript.  This allows us to run a javascript engine in .Net, which allows us to run Uglify2 to minify assets.  Source code for ClearScript can be found at https://clearscript.codeplex.com, and ClearScript is licensed under the MS-PL (http://opensource.org/licenses/MS-PL).

When using outside ASP.Net, notice the post-build steps that are part of the Uglify2.Test project.  These ensure that the ClearScript native assemblies are copied to the proper folder for testing.

When deploying as a web application, do not include the post-build steps that are part of the Uglify2.Test project.  Instead, follow the instructions at https://clearscript.codeplex.com/discussions/458779 for including the native ClearScript assemblies.

The javascript libraries that are used to minify resources, such as uglify2, need to be included in the Uglify project as embedded resources.  This is done by right-clicking on the .js file, properties, then setting the Build Action to Embedded resource.<commit_msg>Updating documentation to include usage guidelines<commit_after>web.optimization
================

This is an implementation of System.Web.Optimization.IBundleTransformer to enhance the Bundling and Minification support in .Net.  Currently, this will output minified javascript and an accompanying source map.

To use this in a web application:

1. Build and include this library in your project

2. Using NuGet, install the ClearScript.V8 package to your web application project.  This should add the following 4 files to the root of your web application project:
    - ClearScriptV8-32.dll
    - ClearScriptV8-64.dll
    - v8-ia32.dll
    - v8-x64.dll

    These files should not be deployed to the bin directory, but should instead be deployed at the root of your web application project.  For more information on this, see  https://clearscript.codeplex.com/discussions/458779).

3. Update your BundleConfig.cs file.  Typically, you create a javascript bundle like this:

    ```javascript
    bundles.Add(new ScriptBundle("~/bundles/js").Include(...));
    ```

    With this library, you would change that line of code to this:

    ```javascript
    bundles.Add(new ScriptBundleWithMap("~/bundles/js").Include(...));
    ```

4. Build and run your project and the Microsoft Web Optimization framework will use this project to minify and source map your javascript files using Uglify2.


Extending This Project
======================

This project uses the Chrome V8 engine as packaged in ClearScript.  This allows us to run a javascript engine in .Net, which allows us to run Uglify2 to minify assets.  Source code for ClearScript can be found at https://clearscript.codeplex.com, and ClearScript is licensed under the MS-PL (http://opensource.org/licenses/MS-PL).

The javascript libraries that are used to minify resources, such as uglify2, need to be included in the Uglify project as embedded resources.  This is done by right-clicking on the .js file, properties, then setting the Build Action to Embedded resource.
{'fraction_non_alphanumeric': 0.07306501547987616, 'fraction_numerical': 0.012074303405572756, 'mean_word_length': 4.279411764705882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '1579019', 'n_tokens_mistral': 859, 'n_tokens_neox': 810, 'n_words': 415}