Provide/Require and dependency tree

41 views
Skip to first unread message

jean.da...@gmail.com

unread,
Jun 17, 2013, 9:31:09 AM6/17/13
to ugli...@googlegroups.com
Hi everyone,

There is an information I cannot find regarding uglifyjs and it surprises me.

Is there an equivalent to ClosureBuilder.py from Closure Compiler in UglifyJS ?

ClosureBuilder is responsible of creating a dependency tree at parse time so as to order files automatically in generated output based on goog.provide and goog.require instructions.

Thanks a lot.

Steven Roussey

unread,
Jun 17, 2013, 12:36:50 PM6/17/13
to ugli...@googlegroups.com
UglifyJS does not provide a require or similar to even know about. However, RequireJS does, and includes r.js that does what you want. It also embeds uglifyjs.
-steve

jean.da...@gmail.com

unread,
Jun 18, 2013, 4:27:35 AM6/18/13
to ugli...@googlegroups.com
Thanks for the direct answer. That's what I thought. Too bad. I don't want to use RequireJS. So in order to have automatic dependency resolving, I'm stick either with switching to closure compiler or implement myself the resolve phase via my own annotations, I guess.
Reply all
Reply to author
Forward
0 new messages