"use strict";

var fs = require('fs');
var adapter = require('./TextToJsonAdapter');
var filename = '20160321_language-subtag-registry.txt';
const ENCODING = 'utf-8';

var data = fs.readFileSync(`./data/${filename}`, ENCODING);
var result = adapter(data);

fs.writeFileSync(
  `./dist/${filename}.json`,
  JSON.stringify(result, null, 2),
  {encoding: ENCODING}
);

@@ -131,12 +131,8 @@
 stry
-.txt
 ';%0Ac
@@ -203,16 +203,20 @@
 ilename%7D
+.txt
 %60, ENCOD

fix extension on filenames