在手写笔中,使用未定义的函数,不会抛出任何错误

时间:2013-05-31 08:11:41

标签: stylus

例如,

手写笔文件:

.dd
  fun() 
  height:10px

我使用nodejs来编译它

var stylus = require('stylus');
var s = stylus(stylusCode);
s.render(function(err, css) {
  if (err) {
    grunt.log.error(err);
    grunt.fail.warn('Stylus failed to compile.');
    callback(css, true);
  } else {
    callback(css, null);
  }
});

在stylus文件中,“fun”函数未定义,我希望它抛出错误,但不是。

0 个答案:

没有答案