Created
December 12, 2011 01:38
-
-
Save clutchski/1464118 to your computer and use it in GitHub Desktop.
print coffee script tokens with metadata
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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var path = require('path'); | |
var CoffeeScript = require('coffee-script'); | |
var file = process.argv[2]; | |
var source = fs.readFileSync(file).toString() | |
var tokens = CoffeeScript.tokens(source); | |
tokens.forEach(function (token) { | |
console.log(token); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment