'use strict';

// TODO: Refactor exports

var path = require('path'),
    File = require('gulp-util').File;

var source = [path.join('source', '*')],
    destination = path.join(__dirname, 'destination'),
    defaultFileName = 'filenamelist.csv',
    customFileName = 'custom.txt',
    defaultPath = path.join(destination, defaultFileName),
    defaultContents = new Buffer('a.txt,b.txt'),
    separatorContents = new Buffer('a.txt,\n\tb.txt'),
    prependContents = new Buffer('var a = [a.txt,b.txt'),
    appendContents = new Buffer('a.txt,b.txt];'),
    quoteSingleContents = new Buffer("'a.txt','b.txt'"),
    quoteDoubleContents = new Buffer('"a.txt","b.txt"');

    var defaultFile = new File({
        path: defaultPath,
        contents: defaultContents
    });

    var filenameFile = new File({
        path: path.join(destination, customFileName)
    });

module.exports = {
    source: source,
    destination: destination,
    customFileName: customFileName,
    defaultContents: defaultContents,
    separatorContents: separatorContents,
    prependContents: prependContents,
    appendContents: appendContents,
    quoteSingleContents: quoteSingleContents,
    quoteDoubleContents: quoteDoubleContents,
    defaultFile: defaultFile,
    filenameFile: filenameFile
};

@@ -12,35 +12,8 @@
 ';%0A%0A
-// TODO: Refactor exports%0A%0A
 var 
@@ -83,16 +83,29 @@
 var 
+utils = %7B%0A    
 source
- =
+:
  %5Bpa
@@ -144,18 +144,17 @@
 tination
- =
+:
  path.jo
@@ -202,18 +202,17 @@
 FileName
- =
+:
  'filena
@@ -242,18 +242,17 @@
 FileName
- =
+:
  'custom
@@ -273,18 +273,17 @@
 aultPath
- =
+:
  path.jo
@@ -277,32 +277,38 @@
 Path: path.join(
+utils.
 destination, def
@@ -304,16 +304,22 @@
 nation, 
+utils.
 defaultF
@@ -339,34 +339,33 @@
  defaultContents
- =
+:
  new Buffer('a.t
@@ -389,34 +389,33 @@
 eparatorContents
- =
+:
  new Buffer('a.t
@@ -441,34 +441,33 @@
  prependContents
- =
+:
  new Buffer('var
@@ -497,34 +497,33 @@
   appendContents
- =
+:
  new Buffer('a.t
@@ -551,34 +551,33 @@
 teSingleContents
- =
+:
  new Buffer(%22'a.
@@ -615,18 +615,17 @@
 Contents
- =
+:
  new Buf
@@ -646,27 +646,22 @@
 b.txt%22')
-;%0A
+,
 %0A    
-var 
 defaultF
@@ -659,26 +659,25 @@
  defaultFile
- =
+:
  new File(%7B%0A
@@ -690,16 +690,22 @@
   path: 
+utils.
 defaultP
@@ -719,32 +719,38 @@
       contents: 
+utils.
 defaultContents%0A
@@ -759,19 +759,14 @@
   %7D)
-;%0A
+,
 %0A    
-var 
 file
@@ -773,18 +773,17 @@
 nameFile
- =
+:
  new Fil
@@ -810,16 +810,22 @@
 th.join(
+utils.
 destinat
@@ -829,16 +829,22 @@
 nation, 
+utils.
 customFi
@@ -857,16 +857,18 @@
 )%0A    %7D)
+%0A%7D
 ;%0A%0Amodul
@@ -883,402 +883,11 @@
 s = 
-%7B%0A    source: source,%0A    destination: destination,%0A    customFileName: customFileName,%0A    defaultContents: defaultContents,%0A    separatorContents: separatorContents,%0A    prependContents: prependContents,%0A    appendContents: appendContents,%0A    quoteSingleContents: quoteSingleContents,%0A    quoteDoubleContents: quoteDoubleContents,%0A    defaultFile: defaultFile,%0A    filenameFile: filenameFile%0A%7D
+utils
 ;%0A

Refactor utils