我正在尝试使用steal/buildjs
Javascript MVC 进行构建,它应该将所有 js 和 css 文件包装到production.js
andproduction.css
中,它会引发错误并仅打印一些函数(我假设)。我在终端内通过调用
./js steal/buildjs appname/appname.html -to appBuild
这就是我在终端上得到的内容(这是错误的一部分 - 实际错误对于 stackoverflow 来说太长了 - 大约 500 多行 - 我正在粘贴错误的开头和结尾):
Building to appBuild/
!!!!!!!!!!! ERROR !!!!!!!!!!!
-tokens =
function (prefix, suffix) {
var c;
var from;
var i = 0;
var length = this.length;
var n;
var q;
var str;
var result = [];
var prereg = true, self = this;
var make = function (type, value) {
prereg = (type == "operator" || type === "name") && (value === "return" || ("(,=:[!&|?{};".indexOf(value.charAt(value.length - 1)) >= 0));
return {type:type, value:value, from:from, to:i, toString:function () {
return "Type: " + type + ", value: " + value + ", from: " + from + ", to: " + i;
}, error:function (message) {
throw "steal/parse/tokens.js " + message + " with " + this.value + ".\n" + self.substr(this.from - 20, 70);
}};
};
[ MORE STUFF RIGHT HERE ]
}
-toJSON =
function (key) {
return String(this);
}
-equals$ =
function equals_2(other) {
return $equals_1(this, other);
}
-getClass$ =
function getClass_32() {
return Ljava_lang_String_2_classLit;
}
-hashCode$ =
function hashCode_4() {
return getHashCode_0(this);
}
-toString$ =
function toString_8() {
return this;
}
-typeId$ = 2
没有任何适当的错误很难调试。有任何想法吗?