Skip to content

Instantly share code, notes, and snippets.

@jmgunn87
Last active August 29, 2015 13:55
Show Gist options
  • Save jmgunn87/8787941 to your computer and use it in GitHub Desktop.
Save jmgunn87/8787941 to your computer and use it in GitHub Desktop.
var diff = require('deep-diff').diff;
var yaml = require('js-yaml');
var es = require('event-stream');
var fs = require('vinyl-fs');
var tokens = {};
fs.src([
"./modules/**/config/locales/en.yml",
"./modules/**/config/locales/ru.yml"
]).pipe(es.map(function (file, callback) {
callback(null, yaml.safeLoad(file.contents.toString()));
})).pipe(es.map(function (json, callback) {
console.log(diff(json, tokens)[0].lhs);
})).on("end", function (err) {
console.log(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment