<commit_before># grunt-asciify

Ascii awesomizer. A Grunt task for better banners and hot logs.

```
    _____     __________________  .___ .___ ________________.___.._.
   /  _  \   /   _____/\_   ___ \ |   ||   |\_   _____/\__  |   || |
  /  /_\  \  \_____  \ /    \  \/ |   ||   | |    __)   /   |   || |
 /    |    \ /        \\     \____|   ||   | |     \    \____   | \|
 \____|__  //_______  / \______  /|___||___| \___  /    / ______| __
         \/         \/         \/                \/     \/        \/
```
[![Dependency Status](https://david-dm.org/olizilla/grunt-asciify.png)](https://david-dm.org/olizilla/grunt-asciify)
[![Build Status](https://travis-ci.org/olizilla/grunt-asciify.png)](https://travis-ci.org/olizilla/grunt-asciify)


```js
asciify: {
  myBanner: {
    text: 'Text to asciify'
  }
},
uglify:{
  options: {
    banner: '/*!\n <%= asciify_myBanner %> \n*/\n'
  },
  all:{
    src:'Gruntfile.js',
    dest:'Gruntfile.withbanner.min.js'        
  }
}
```

## Getting Started
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-asciify --save-dev
```

One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-asciify');
```

## The "asciify" task

### Overview
In your project's Gruntfile, add a section named `asciify` to the data object passed into `grunt.initConfig()`.

### Options

#### Default Options
```js
options:{
  font:'graffiti'
  log:false,
}
```

#### options.font
Type: `String`
Default value: `graffiti`

The name of the figlet font to use. Full list here: https://github.com/olizilla/figlet-js/tree/master/fonts

#### options.log
Type: `Boolean`
Default value: `false`

Write your asciified text to the console

![asciify options.log=true](https://raw.github.com/olizilla/grunt-asciify/master/doc/grunt-asciify.png);

### Usage Examples

```js
grunt.initConfig({
  asciify: {
    banner:{
      text: 'GRUNT-ASCIIFY!',
      options:{
        font:'graffiti',
        log:true
      }
    }
  },

  // Use asciify to make banner
  uglify:{
    options: {
      banner: '/*!\n <%= asciify_banner %> \n*/\n'
    },
    all:{
      src:'Gruntfile.js',
      dest:'Grunfile.withbanner.min.js'        
    }
  }
})<commit_msg>Fixes #1 - README documents the need to run the asciify task<commit_after># grunt-asciify

Ascii awesomizer. A Grunt task for better banners and hot logs.

```
    _____     __________________  .___ .___ ________________.___.._.
   /  _  \   /   _____/\_   ___ \ |   ||   |\_   _____/\__  |   || |
  /  /_\  \  \_____  \ /    \  \/ |   ||   | |    __)   /   |   || |
 /    |    \ /        \\     \____|   ||   | |     \    \____   | \|
 \____|__  //_______  / \______  /|___||___| \___  /    / ______| __
         \/         \/         \/                \/     \/        \/
```
[![Dependency Status](https://david-dm.org/olizilla/grunt-asciify.png)](https://david-dm.org/olizilla/grunt-asciify)
[![Build Status](https://travis-ci.org/olizilla/grunt-asciify.png)](https://travis-ci.org/olizilla/grunt-asciify)

Running the asciify task as configured below will push your awesomized text into property called asciify_myBanner which can then be used else where, as the template for an awesome file banner for example.

```js
asciify: {
  myBanner: {
    text: 'Text to asciify'
  }
},
uglify:{
  options: {
    banner: '/*!\n <%= asciify_myBanner %> \n*/\n'
  },
  all:{
    src:'Gruntfile.js',
    dest:'Gruntfile.withbanner.min.js'        
  }
}
```
Asciify picks a property name to store the output by prepending your target name with `asciify_`. In the above example we used `myBanner` as the target, so the property name became `asciify_myBanner`.

## Getting Started
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-asciify --save-dev
```

One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-asciify');
```

## The "asciify" task

In your project's Gruntfile, add a section named `asciify` to the data object passed into `grunt.initConfig()`.

### Options

#### Default Options
```js
options:{
  font:'graffiti'
  log:false,
}
```

#### options.font
Type: `String`
Default value: `graffiti`

The name of the figlet font to use. Full list here: https://github.com/olizilla/figlet-js/tree/master/fonts

#### options.log
Type: `Boolean`
Default value: `false`

Write your asciified text to the console

![asciify options.log=true](https://raw.github.com/olizilla/grunt-asciify/master/doc/grunt-asciify.png);

### Usage Examples

```js
grunt.initConfig({
    
  asciify: { 
    banner:{
      text: 'GRUNT-ASCIIFY!',
      
      // Add the awesome to the console, and use the best font.
      options:{ 
        font:'graffiti',
        log:true
      }
    }
  },

  
  uglify:{
    
    // Use the property holding our awesomised text in the banner template      
    options: {
      banner: '/*!\n <%= asciify_banner %> \n*/\n'
    },
    all:{
      src:'Gruntfile.js',
      dest:'Grunfile.withbanner.min.js'
    }
  }
});

grunt.loadNpmTasks('grunt-asciify');
grunt.loadNpmTasks('grunt-contrib-uglify');

// Run asciify before uglify so the asciify_banner property is available.
grunt.registerTask('default', ['asciify', 'uglify']);
{'fraction_non_alphanumeric': 0.1536540702513734, 'fraction_numerical': 0.001165307141668054, 'mean_word_length': 2.612748045700541, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '36870', 'n_tokens_mistral': 2172, 'n_tokens_neox': 2111, 'n_words': 496}