<commit_before>broom
============

Helps you stay on top of all that dust, regardless if it's inside or outside.

broom is a dust.js template precompiler and package. I was working on a CouchApp and wanted some template
rendering on the server side and some on the client. So this is a utility that helped me keep up with that.

If you don't know what [Dust.js](http://akdubya.github.com/dustjs "Github - dustjs") is, I would suggest checking it out. Pretty nice templating in the classic node.js way
(async and with streaming).

Installation
------------
Don't have this published yet but if you want to grab it and play around:

    $ git clone git://github.com/copenhas/broom
    $ cd ./broom
    $ npm link

Then use npm link in a project to "link install": `npm link broom`

Usage
-----
Assuming broom is in your path:

    broom path/to/templates

Command assumes a broom.json file will be in that directory. Targets do not have to exist but the directory they
are to be written to does. If the target already exists they will be deleted first.

Bundling dust.js core currently doesn't work. I seemed to have broken it recently...

Annotated example broom.json
---------
    {
        //root directory to use for the targets
        "root" : "../",
        "targets" : {
            //hash of file paths for the output targets
            "db/lib/templates.js" : {
                //if dust core should be bundled<commit_msg>update the readme now that bundling works<commit_after>broom
============

Helps you stay on top of all that dust, regardless if it's inside or outside.

broom is a dust.js template precompiler and package. I was working on a CouchApp and wanted some template
rendering on the server side and some on the client. So this is a utility that helped me keep up with that.

If you don't know what [Dust.js](http://akdubya.github.com/dustjs "Github - dustjs") is, I would suggest checking it out. Pretty nice templating in the classic node.js way
(async and with streaming).

Installation
------------
Don't have this published yet but if you want to grab it and play around:

    $ git clone git://github.com/copenhas/broom
    $ cd ./broom
    $ npm link

Then use npm link in a project to "link install": `npm link broom`

Usage
-----
Assuming broom is in your path:

    broom path/to/templates

Command assumes a broom.json file will be in that directory. Targets do not have to exist but the directory they
are to be written to does. If the target already exists they will be deleted first.

Annotated example broom.json
---------
    {
        //root directory to use for the targets
        "root" : "../",
        "targets" : {
            //hash of file paths for the output targets
            "db/lib/templates.js" : {
                //if dust core should be bundled
{'fraction_non_alphanumeric': 0.0891583452211127, 'fraction_numerical': 0.0, 'mean_word_length': 2.7005277044854883, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4056124', 'n_tokens_mistral': 782, 'n_tokens_neox': 756, 'n_words': 400}