grunt-words-and-hyphens

0.0.4 • Public • Published

grunt-words-and-hyphens

Extracts unique words and hyphens from a text file stripping punctuation on the way and writes results into a json file (e.g. src_file.txt.words_and_hyphens.json)

Build Status Coverage Status Dependency Status

NPM

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-words-and-hyphens --save-dev

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

grunt.loadNpmTasks('grunt-words-and-hyphens');

The "words_and_hyphens" task

Overview

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

grunt.initConfig({
  'words_and_hyphens': {
    options: {
      // Task-specific options go here.
    },
    files: [/* glob patterns */]
  }
});

Options

options.pattern

Type: String

The node module words-and-hyphens uses hypher for hyphenation. In order for it to work, you must install a hyphanation pattern module and pass its name in the pattern option to grunt-words-and-hyphens.

Usage Example

grunt.initConfig({
  'words_and_hyphens': {
    options: {
      pattern: 'hyphenation.de'
    },
    files: ['some/folder/**/*.txt']
  }
});

Contributing

Issues and Pull-requests are absolutely welcome. If you want to submit a patch, please make sure that you follow this simple rule:

All code in any code-base should look like a single person typed it, no matter how. many people contributed. — idiomatic.js

Lint with:

npm run jshint

Test with:

npm run mocha

Check code coverage with:

npm run istanbul

Then please commit with a detailed commit message.

Package Sidebar

Install

npm i grunt-words-and-hyphens

Weekly Downloads

1

Version

0.0.4

License

none

Last publish

Collaborators

  • borisdiakur