Last active
December 18, 2015 00:59
-
-
Save noyesa/5700701 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var fs = require('fs'); | |
| if (process.argv.length < 3) { | |
| console.log('JavaScript.js: the JavaScript to JavaScript transpiler.'); | |
| console.log('Please profile a source file.'); | |
| process.exit(1); | |
| } | |
| fs.readFile(process.argv[3], 'utf8', function(error, data) { | |
| if (error) { | |
| console.error(error.message); | |
| process.exit(1); | |
| } | |
| console.log(data); | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Huge milestone: JavaScript.js has become self-compiling.
anoyes-mn1:Desktop anoyes$ node JavaScript.js JavaScript.js
JavaScript.js: the JavaScript to JavaScript transpiler.
var fs = require('fs');
console.log('JavaScript.js: the JavaScript to JavaScript transpiler.');
if (process.argv.length < 3) {
console.log('Please profile a source file.');
process.exit(1);
}
fs.readFile(process.argv[1], 'utf8', function(error, data) {
if (error) {
console.error(error.message);
process.exit(1);
}
console.log(data);
});
anoyes-mn1:Desktop anoyes$