Created
August 23, 2014 15:00
-
-
Save veltman/8822eb9a25488c228a52 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
cd TimelineJS/source/js/Core/Language/locale | |
# Append fs.writeFile("[abbreviation].json",JSON.stringify(VMM.Language)) to each file | |
for f in *; do echo "fs.writeFile(\"$f\".replace(\".js\",\".json\"),JSON.stringify(VMM.Language));" >> $f; done | |
# Initialize required vars in an alphabetically first file | |
echo "var fs = require('fs'), trace = function(){}, VMM = {};" > aa.js | |
# Combine to one script | |
cat * > execute-me.js | |
# Run it | |
node execute-me.js | |
# Folder now contains a *.json for each one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment