mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 10:33:22 +00:00
3f36d83bfb
Helpful binary when developing / debugging
17 lines
318 B
JavaScript
Executable File
17 lines
318 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
var fs = require('fs');
|
|
|
|
var gitbook = require('../../');
|
|
|
|
if(process.argv < 3) {
|
|
console.error('Please specify a filename');
|
|
process.exit(1);
|
|
}
|
|
|
|
var content = fs.readFileSync(process.argv[2], 'utf8');
|
|
|
|
var lexed = gitbook.parse.lex(content);
|
|
|
|
console.log(JSON.stringify(lexed, null, 2));
|