0.2.0 • Published 8 years ago

grunt-csv-concat-ext v0.2.0

Weekly downloads
3
License
-
Repository
github
Last release
8 years ago

grunt-csv-concat

Grunt plugin to concat CSV files in a given folder

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-csv-concat-ext --save-dev

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

grunt.loadNpmTasks('grunt-csv-concat-ext');

The "csv_concat" task

Overview

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

grunt.initConfig({
  csv_concat: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});

Options

options.delimiter

Type: String Default value: ','

What are the columns delimited by?

options.src

Type: String Default value: ''

Source directory where the csv files are

options.dest

Type: String Default value: ''

Destination file where the concatd CSVs are placed into

options.addPrefixToKey

Type: Boolean Default value: false

Generate a prefix for the keys from the folder structure and the file name?

Usage Examples

grunt.initConfig({
  csv_concat: {
    options: {
      delimiter: '|',
      src: __dirname + '/test/fixtures',
      ignore: 'ignore.csv',
      dest: __dirname + '/test/tmp/final.csv'
    }
  }
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

0.2.0

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago