Control: tag -1 +patch 

Hi from the Paris Bugs Squashing Party :)

It seems that the current code relies on functions not available in
Uglify anymore:

$ grep -ir ast_mangle /usr/lib/nodejs/uglify-js/
$ grep -ir ast_squeeze /usr/lib/nodejs/uglify-js/

So probably the package.json is incorrect.


The attached attached patch appears to work, I just followed
https://github.com/mishoo/UglifyJS2#the-simple-way


Cheers!
Sylvain
Index: coffeescript-1.4.0/Cakefile
===================================================================
--- coffeescript-1.4.0.orig/Cakefile
+++ coffeescript-1.4.0/Cakefile
@@ -125,8 +125,9 @@ task 'build:browser', 'rebuild the merge
     }(this));
   """
   unless process.env.MINIFY is 'false'
-    {parser, uglify} = require 'uglify-js'
-    code = uglify.gen_code uglify.ast_squeeze uglify.ast_mangle parser.parse code
+    uglify = require 'uglify-js'
+    result = uglify.minify(code, {fromString: true});
+    code = result.code
   fs.writeFileSync 'extras/coffee-script.js', header + '\n' + code
 
 
_______________________________________________
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to