UglifyJS fails on custom build #892

Closed
ihatemornings opened this Issue Jan 1, 2014 · 1 comment

Projects

None yet

2 participants

@ihatemornings

I tried a few different ways to run the build script with the modules I wanted to include ("zepto event ajax form touch"), and every time zepto.js was created, but zepto.min.js wasn't. Uglify threw an error.

I installed Uglify globally, ran in on zepto.js and got the following error:

$ uglifyjs zepto.js -o zepto.min.js
Parse error at zepto.js:867,8
Unexpected token: name (Fuchs)

Turns out "Thomas Fuchs" was sitting in the middle of zepto.js (not in a comment or quoted) and confusing the parser. It was just after these lines:

window.Zepto = Zepto
window.$ === undefined && (window.$ = Zepto)

Removing the "Thomas Fuchs" line solved the problem.

@mislav mislav closed this in dc2355a Jan 1, 2014
@mislav
Collaborator

Thanks for letting us know. It was a whitespace snafu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment