scalableminds / amd-optimize

An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.
MIT License
162 stars 29 forks source link

Set module name in define #39

Closed tamtakoe closed 9 years ago

tamtakoe commented 9 years ago

I have files:

app/file1.js
define([ 'dep1', 'dep2'], function() {...}

How I can get

app/file1.js
define('app/file1', [ 'dep1', 'dep2'], function() {...}

after amd-optimize processing?

tamtakoe commented 9 years ago

See: https://github.com/jrburke/r.js/blob/master/dist.js#L79-L81

tamtakoe commented 9 years ago

And why if I process jQuery.js I have original file plus

define('jQuery', [], function () {
    return;
});

at the end? Is it shimmed file?

tamtakoe commented 9 years ago

Sorry, it is my mistake