Created
June 23, 2014 19:37
-
-
Save Zegnat/ced80b06a1bd037c0731 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var db = './source/db', | |
fs = require('fs'); | |
fs.readdirSync(db).forEach(function (file) { | |
if (file.match(/^\w\w(-\w+)?-projects\.json$/)) { | |
fs.writeFileSync(db + '/' + file, JSON.stringify(JSON.parse(fs.readFileSync(db + '/' + file, 'utf8')), null, ' ') + "\n"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment