UNPKG

werkzeug

Version:

compiles ts, coffee, sass/scss, less/ stylus and packs browser ready bundles

18 lines (17 loc) 675 B
# stylus hack to get error informations without parsing the message StylusUtils = require 'stylus/lib/utils' formatExceptionHack = StylusUtils.formatException StylusUtils.formatException = (err, options) -> err.filename = options.filename err.lineno = options.lineno err.column = options.column - 1 err.text = err.message formatExceptionHack err, options # another stylus hack to get correct error text in some cases Lexer = require 'stylus/lib/lexer' advanceHack = Lexer.prototype.advance Lexer.prototype.advance = () -> try advanceHack.call(this) catch throw new Error('unexpected end or literal expected')