/*
 * statici18n
 * https://github.com/beck/grunt-static-i18n
 *
 * Copyright (c) 2014 Douglas Beck
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

  var statici18n = function() {

    // Merge task-specific and/or target-specific options with these defaults.
    var options = this.options({
      punctuation: '.',
      separator: ', '
    });

    // Iterate over all specified file groups.
    this.files.forEach(function(file) {
      // Concat specified files.
      var src = file.src.filter(function(filepath) {
        // Warn on and remove invalid source files (if nonull was set).
        if (!grunt.file.exists(filepath)) {
          grunt.log.warn('Source file "' + filepath + '" not found.');
          return false;
        } else {
          return true;
        }
      }).map(function(filepath) {
        // Read file source.
        return grunt.file.read(filepath);
      }).join(grunt.util.normalizelf(options.separator));

      // Handle options.
      src += options.punctuation;

      // Write the destination file.
      grunt.file.write(file.dest, src);

      // Print a success message.
      grunt.log.writeln('File "' + file.dest + '" created.');
    });
  };

  var docstr = 'Grunt plugin to translate static assets.';
  grunt.registerMultiTask('statici18n', docstr, statici18n);

};

@@ -177,289 +177,61 @@
 tion
-(grunt) %7B%0A%0A  var statici18n = function() %7B%0A%0A    // Merge task-specific and/or target-specific options with these defaults.%0A    var options = this.options(%7B%0A      punctuation: '.',%0A      separator: ', '%0A    %7D);%0A%0A    // Iterate over all specified file groups.%0A    this.files.forEach(
+ statici18n(grunt) %7B%0A%0A  var options;%0A%0A  var plugin = 
 func
@@ -239,20 +239,16 @@
 ion(
-file
 ) %7B%0A    
   //
@@ -247,746 +247,133 @@
     
-  // Concat specified files.%0A      var src = file.src.filter(function(filepath) %7B%0A        // Warn on and remove invalid source files (if nonull was set).%0A        if (!grunt.file.exists(filepath)) %7B%0A          grunt.log.warn('Source file %22' + filepath + '%22 not found.');%0A          return false;%0A        %7D else %7B%0A          return true;%0A        %7D%0A      %7D).map(function(filepath) %7B%0A        // Read file source.%0A        return grunt.file.read(filepath);%0A      %7D).join(grunt.util.normalizelf(options.separator));%0A%0A      // Handle options.%0A      src += options.punctuation;%0A%0A      // Write the destination file.%0A      grunt.file.write(file.dest, src);%0A%0A      // Print a success message.%0A      grunt.log.writeln('File %22' + file.dest + '%22 created.'
+options = this.options(%7B%0A      localeDir: 'locale',%0A    %7D);%0A%0A    this.files.forEach(function task(file) %7B%0A      file.src.map(
 );%0A 
@@ -492,25 +492,21 @@
 docstr, 
-statici18
+plugi
 n);%0A%0A%7D;%0A

Restructure plugin module. Flatter. No anons