summaryrefslogtreecommitdiffstats
path: root/test/bin/summary.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-14 22:41:34 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-14 22:41:34 +0100
commit2cab0187919b1c8d9cb7dcdcd04d45e1b536b4ef (patch)
tree418e94091b340e49bf4ab4eb2bd73cbb7690bd20 /test/bin/summary.js
parentbcb34dcd79f1ff49e947e16e91528ebe554c8449 (diff)
parentae52ef5b788a460e3fa42ad0d5326267daa71c3c (diff)
downloadgitbook-2cab0187919b1c8d9cb7dcdcd04d45e1b536b4ef.zip
gitbook-2cab0187919b1c8d9cb7dcdcd04d45e1b536b4ef.tar.gz
gitbook-2cab0187919b1c8d9cb7dcdcd04d45e1b536b4ef.tar.bz2
Merge pull request #553 from GitbookIO/fix/summary-whitespace
Fix/summary whitespace
Diffstat (limited to 'test/bin/summary.js')
-rwxr-xr-xtest/bin/summary.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/bin/summary.js b/test/bin/summary.js
new file mode 100755
index 0000000..78c20dc
--- /dev/null
+++ b/test/bin/summary.js
@@ -0,0 +1,16 @@
+#!/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.summary(content);
+
+console.log(JSON.stringify(lexed, null, 2));