0

I'm using AMD-like function in my project, but all js files are concatenated into one (with grunt-contrib-concat). I want Q to be concatenated as well. The problem is I can't declare Q as dependency in my other modules, cause it declares itself as anonymous one.

define('mymodule', ['q'], function (Promise) {
    return Promise;
});

What are possible solutions? I actually need only files to be concatenated, AMD may be changed to e.g. any other loader.

kirilloid
  • 14,011
  • 6
  • 38
  • 52
  • Perhaps file an issue against Q suggesting how it would need to be revised to support your use-case. In v2 (there is a branch), Q is in CommonJS only format and the AMD version is built and published to S3 for each commit. Perhaps the AMD form can be made more suitable for your case. – Kris Kowal Mar 06 '14 at 18:43
  • Thanks, Kris. I suggest, I'll switch to `CommonJS` for now and will create an issue. – kirilloid Mar 06 '14 at 19:34

0 Answers0