Created
January 13, 2015 23:44
-
-
Save TheRoccoB/200b4e814f15d44f9ace 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
//base 64 encoding with node.js | |
// usage: node b64.js inputFile outputFile | |
var fs = require('fs'); | |
if (process.argv.length < 3){ | |
getSubsetCSS(process.argv[2], (process.argv.length > 3) ? process.argv[3] : '400', getWoff); | |
console.log('usage node b64.js inputFile outputFile'); | |
} | |
else{ | |
fs.readFile(process.argv[2], function(err, data) { | |
var base64data = new Buffer(data).toString('base64'); | |
fs.writeFile(process.argv[3], base64data, function(err) { | |
if(err) { | |
console.log(err); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment