define('foo', [], function () { return 123; }),
define('bar', [], function () { return 456; });
gets translated to
;(function() {
define('foo', [], function () {
return 123;
}), define('bar', [], function () {
return 456;
});
}());
instead of
;(function() {
var foo, bar;
foo = 123;
bar = 456;
}());
Try out here: http://gregfranko.com/amdclean/?code=define('foo'%2C%20%5B%5D%2C%20function%20()%20%7B%20return%20123%3B%20%7D)%2C%0Adefine('bar'%2C%20%5B%5D%2C%20function%20()%20%7B%20return%20456%3B%20%7D)%3B