Hello,
I would like to use JQueryUI with javascriptMVC, I copied the git repository https://github.com/daffl/jqueryui that provides a JQuery UI version packaged with steal to my project root directory.
Then I put in the controller file:
steal('jquery/controller',
'jquery/view/ejs',
'steal/less')
.then('cookbook/jquery-ui.css',
'jqueryui/tabs')
.then('./views/init.ejs',
'./show.less',
in order to build tabs with jqueryUI.
It works fine in development mode but when I try to compress in production mode, I obtain this ouptut and nothing is generated:
Building to cookbook/
!!!!!!!!!!! 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.fro
m - 20, 70);
}};
};
var has = function (thIs, before) {
var j = i + 1;
for (; ; ) {
c = this.charAt(j);
if (c === thIs) {
return true;
}
if (before.test(c) || c === "") {
return false;
}
j += 1;
}
};
if (!this) {
return;
}
if (typeof prefix !== "string") {
prefix = "<>+-&";
}
if (typeof suffix !== "string") {
suffix = "=>&:";
}
c = this.charAt(i);
while (c) {
from = i;
if (c <= " ") {
i += 1;
c = this.charAt(i);
} else {
if (c === "_" || c >= "a" && c <= "z" || c >= "A" && c <= "Z") {
str = c;
i += 1;
for (; ; ) {
c = this.charAt(i);
if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z") || (c >= "0" && c <= "9") || c ===
"_") {
str += c;
i += 1;
} else {
break;
}
}
result.push(make("name", str));
} else {
if (c >= "0" && c <= "9") {
str = c;
i += 1;
for (; ; ) {
c = this.charAt(i);
if (c < "0" || c > "9") {
break;
}
i += 1;
str += c;
}
if (c === ".") {
i += 1;
str += c;
for (; ; ) {
c = this.charAt(i);
if (c < "0" || c > "9") {
break;
}
i += 1;
str += c;
}
}
if (c === "e" || c === "E") {
i += 1;
str += c;
c = this.charAt(i);
if (c === "-" || c === "+") {
i += 1;
str += c;
c = this.charAt(i);
}
if (c < "0" || c > "9") {
make("number", str).error("Bad exponent");
}
do {
i += 1;
str += c;
c = this.charAt(i);
} while (c >= "0" && c <= "9");
}
if (c == "x") {
i += 1;
str += c;
for (; ; ) {
c = this.charAt(i);
if (!((c >= "0" && c <= "9") || (c >= "a" && c <= "f") || (c >= "A" && c <= "F"
))) {
break;
}
i += 1;
str += c;
}
}
if (c >= "a" && c <= "z") {
str += c;
i += 1;
print(this.substr(i - 20, 20));
print(this.substr(i, 20));
make("number", str).error("Bad number");
}
n = +str;
if (isFinite(n)) {
result.push(make("number", n));
} else {
make("number", str).error("Bad number");
}
} else {
if (c === "'" || c === "\"") {
str = "";
q = c;
i += 1;
var cntrlAllowed = false;
for (; ; ) {
c = this.charAt(i);
if (c < " " && c !== "\t") {
if (str.charAt(str.length - 1) == "\\" && (c === "\n" || c === "\r")) {
str = str.substr(0, str.length - 1);
i = i + 1;
continue;
} else {
make("string", str).error(c === "\n" || c === "\r" || c === "" ? "Unter
minated string." : "Control character in string. " + c + "|", make("", str));
}
}
if (c === q) {
break;
}
if (c === "\\") {
i += 1;
if (i >= length) {
make("string", str).error("Unterminated string");
}
c = this.charAt(i);
switch (c) {
case "\n":
case "\r":
c = "";
i += 1;
break;
case "b":
c = "\b";
break;
case "f":
c = "\f";
break;
case "n":
c = "\n";
break;
case "r":
c = "\r";
break;
case "t":
c = "\t";
break;
case "u":
if (i >= length) {
make("string", str).error("Unterminated string");
}
c = parseInt(this.substr(i + 1, 4), 16);
if (!isFinite(c) || c < 0) {
make("string", str).error("Unterminated string");
}
c = String.fromCharCode(c);
i += 4;
break;
}
}
str += c;
i += 1;
}
i += 1;
result.push(make("string", str));
c = this.charAt(i);
} else {
if (c === "/" && this.charAt(i + 1) === "*") {
var str = c;
i += 1;
for (; ; ) {
c = this.charAt(i);
str += c;
if (c === "*" && this.charAt(i + 1) == "/") {
i += 1;
i += 1;
str += "/";
c = this.charAt(i);
result.push(make("comment", str));
break;
}
i += 1;
}
} else {
if (c === "/" && this.charAt(i + 1) === "/") {
i += 1;
for (; ; ) {
c = this.charAt(i);
if (c === "\n" || c === "\r" || c === "") {
break;
}
i += 1;
}
} else {
if (c === "/" && has.call(this, "/", /[\n\r]/) && prereg) {
i += 1;
var str = c;
for (; ; ) {
c = this.charAt(i);
if (c === "\\") {
str += c;
i += 1;
c = this.charAt(i);
str += c;
i += 1;
c = this.charAt(i);
continue;
}
if (c === "/") {
str += c;
i += 1;
c = this.charAt(i);
while (/\w/.test(c)) {
str += c;
i += 1;
c = this.charAt(i);
}
result.push(make("regexp", str));
break;
}
str += c;
i += 1;
}
} else {
if (prefix.indexOf(c) >= 0) {
str = c;
i += 1;
while (i < length) {
c = this.charAt(i);
if (suffix.indexOf(c) < 0) {
break;
}
str += c;
i += 1;
}
result.push(make("operator", str));
} else {
i += 1;
result.push(make("operator", c));
c = this.charAt(i);
}
}
}
}
}
}
}
}
}
return result;
}
-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
-trim =
function () {
return String(this).replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
Anybody has an idea to help me?
Thanks,
Sandrine.