<NME> v1.js
<BEF> var gutil = require( 'gulp-util' );
var through  = require( 'through2' );
var path = require( 'path' );
var prefs = require( './prefs.json' );

module.exports = function () {
  var transform = function( file, enc, callback ) {
    var content = file.contents.toString();
    var res = JSON.parse( content );

    var postal_codes = {};
    for ( var i = 0; i < res.length; i++ ) {
      var line = res[i];

      if ( ! prefs[line.prefecture] ) {
        console.log( line.prefecture );
        process.exit(1);
      }

      var data = {
      }

      var data = {
        ja: {
          prefecture: line[1].trim(),
          address1: line[2].replace( '　', '' ).trim(),
        },
        en: {
          prefecture: line.en.pref,
          address1: line.en.addr1,
          address2: line.en.addr2,
          address3: line.en.addr3,
          address4: line.en.addr4
        }
      };

      if ( postal_codes[line.postal_code] ) {
        postal_codes[line.postal_code].data.push( data );
      };

      if ( postal_codes[line[0].toString().trim()] ) {
        postal_codes[line[0].toString().trim()].address.push( data );
      } else {
        postal_codes[line[0].toString().trim()] = {
          code: line[0].toString().trim(),
          prefcode: prefs[line[1]],
          address: [data]
        };
      }
    }
        path: path.join( __dirname, p.replace( /^([0-9]{3}).*/, '$1' ),
                  p.replace( /.*([0-9]{4})$/, '$1' ) + '.json' ),
        contents: new Buffer( JSON.stringify( postal_codes[p] ) + "\n" )
      } );

      this.push( file );
    }

    return callback();
  };

  return through.obj( transform );
};

<MSG> bug fix on prefcode

<DFF> @@ -21,6 +21,7 @@ module.exports = function () {
       }
 
       var data = {
+        prefcode: prefs[line[1]],
         ja: {
           prefecture: line[1].trim(),
           address1: line[2].replace( '　', '' ).trim(),
@@ -39,12 +40,11 @@ module.exports = function () {
       };
 
       if ( postal_codes[line[0].toString().trim()] ) {
-        postal_codes[line[0].toString().trim()].address.push( data );
+        postal_codes[line[0].toString().trim()].data.push( data );
       } else {
         postal_codes[line[0].toString().trim()] = {
           code: line[0].toString().trim(),
-          prefcode: prefs[line[1]],
-          address: [data]
+          data: [data]
         };
       }
     }

bug fix on prefcode