jade-strip-comments
Strips comments from Jade token stream
Installation
npm install jade-strip-comments
Usage
var lex = ;var stripComments = ; var tokens = ;// [ { type: 'comment', line: 1, val: ' unbuffered', buffer: false },// { type: 'newline', line: 2 },// { type: 'comment', line: 2, val: ' buffered', buffer: true },// { type: 'eos', line: 2 } ] // Only strip unbuffered comments (default);// [ { type: 'newline', line: 2 },// { type: 'comment', line: 2, val: ' buffered', buffer: true },// { type: 'eos', line: 2 } ] // Only strip buffered comments (when you want to play a joke on your coworkers);// [ { type: 'comment', line: 1, val: ' unbuffered', buffer: false },// { type: 'newline', line: 2 },// { type: 'eos', line: 2 } ] // Strip both (if you want Jade VERY clean);// [ { type: 'newline', line: 2 },// { type: 'eos', line: 2 } ]
License
MIT