<commit_before># resmin
	
All-in-one minifier/merger/compressor middleware for connect/express.

## Installation

```bash
$ npm install resmin
```

## Dependencies

Resmin depends on the following libraries:

- [uglify-js](https://github.com/mishoo/UglifyJS)
- [uglifycss](https://github.com/fmarcia/UglifyCSS)
- [compress](https://github.com/waveto/node-compress)
- [mime](https://github.com/bentomas/node-mime)

## Supported

Resmin has integrated support for the the following libraries:

- [less](https://github.com/cloudhead/less.js)

## Basic usage

Resmin is built to be dead simple to use and implement.

###Example configuration:

```javascript
var resminConfig = {
    gzip: true,
    merge: true,
    compress: true,
    js: {
        "all": [
            "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js",
            "//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js",
            "/js/foo.js",
            "/js/bar.js",
            "/js/baz.js"
        ]
    },
    css: {
        "all": [
            "//fonts.googleapis.com/css?family=Inconsolata:regular&v1",
            "/css/foo.css",
            "/css/bar.css",
            "/css/baz.css"
        ]
    }
};
```
    
Instantiate resmin and add the middleware and dynamic helper to connect/express.
    
    var resmin = require('resmin');
	app.use(resmin.middleware(__dirname+'/public/', resminConfig));
    app.dynamicHelpers(resmin.dynamicHelper);

The resmin variable is now accessible through your template engine of choice.

###Example when using jade/haml:

```yaml
- each url in resmin.css.all
  link(rel='stylesheet', href=url)
- each url in resmin.js.all
  script(src=url)
```

###Example when using ejs:

```html
<% for (url in resmin.css.all) { %>
    <link rel="stylesheet" href="<%= resmin.css.all[url] %>">
<% } %>
<% for (url in resmin.js.all) { %>
    <script src="<%= resmin.js.all[url] %>"></script>
<% } %>
```<commit_msg>Updated to reflect arg changes<commit_after># resmin
	
All-in-one minifier/merger/compressor middleware for connect/express.

## Installation

```bash
$ npm install resmin
```

## Dependencies

Resmin depends on the following libraries:

- [uglify-js](https://github.com/mishoo/UglifyJS)
- [uglifycss](https://github.com/fmarcia/UglifyCSS)
- [compress](https://github.com/waveto/node-compress)
- [mime](https://github.com/bentomas/node-mime)

## Supported

Resmin has integrated support for the the following libraries:

- [less](https://github.com/cloudhead/less.js)

## Basic usage

Resmin is built to be dead simple to use and implement.

###Example configuration:

```javascript
var resminConfig = {
    gzip: true,
    merge: true,
    compress: true,
    js: {
        "all": [
            "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js",
            "//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js",
            "/js/foo.js",
            "/js/bar.js",
            "/js/baz.js"
        ]
    },
    css: {
        "all": [
            "//fonts.googleapis.com/css?family=Inconsolata:regular&v1",
            "/css/foo.css",
            "/css/bar.css",
            "/css/baz.css"
        ]
    }
};
```
    
Instantiate resmin and add the middleware and dynamic helper to connect/express.
    
    var resmin = require('resmin');
	app.use(resmin.middleware(express, __dirname+'/public/', resminConfig));
    app.dynamicHelpers(resmin.dynamicHelper);

The resmin variable is now accessible through your template engine of choice.

###Example when using jade/haml:

```yaml
- each url in resmin.css.all
  link(rel='stylesheet', href=url)
- each url in resmin.js.all
  script(src=url)
```

###Example when using ejs:

```html
<% for (url in resmin.css.all) { %>
    <link rel="stylesheet" href="<%= resmin.css.all[url] %>">
<% } %>
<% for (url in resmin.js.all) { %>
    <script src="<%= resmin.js.all[url] %>"></script>
<% } %>
```
{'fraction_non_alphanumeric': 0.1688877498718606, 'fraction_numerical': 0.004100461301896463, 'mean_word_length': 2.796692607003891, 'pattern_counts': {'":': 4, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 10, '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': '7599487', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1327, 'n_words': 279}