Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

"// req: jquery as $" becomes "jquery as $" #24

Open
esc-mhild opened this issue Oct 31, 2013 · 6 comments
Open

"// req: jquery as $" becomes "jquery as $" #24

esc-mhild opened this issue Oct 31, 2013 · 6 comments

Comments

@esc-mhild
Copy link

The syntax

// req: jquery as $

leads to

define('esc', ['jquery as $'], function(jquery as $) {
...
});

I take it this is not intended.

My full js file looks like this:

/**
* ESC top-level namespace.
*
* @module esc
*/
var esc;
(function (esc) {

// req: jquery as $
/// <reference path="../../../../lib/jquery.d.ts"/>
/**
* here goes nothing
*/

})(esc || (esc = {}));
//# sourceMappingURL=esc.js.map

Many thanks for this very useful tool!

As you can see, I'm trying out Interleave to avoid the forced choice between internal and external modules in Typescript. I'm using Typescript's /// directive to compile all of my project-internal ts files into a single js file and then use Interleave to expose it as a AMD module.

@DamonOehlman
Copy link
Member

Interesting use case. Sorry for the massive delay in getting back to you - I'm trying to clean up my issue backlog and only just came across this one.

Did you manage to find a solution with another tool?

@esc-mhild
Copy link
Author

I did not find a solution. For the time being, I put together an ugly hack using the concatenation task.

---- On Tue, 13 May 2014 05:45:38 -0400 Damon Oehlman <[email protected]> wrote ----

Interesting use case. Sorry for the massive delay in getting back to you - I'm trying to clean up my issue backlog and only just came across this one.
Did you manage to find a solution with another tool?

Reply to this email directly or view it on GitHub.

@DamonOehlman
Copy link
Member

In that case, I'll see what I can do to make this work for you.

@esc-mhild
Copy link
Author

Many thanks! We like the idea of interleave but had set it aside when we ran into this issue.

---- On Tue, 13 May 2014 08:33:16 -0400 Damon Oehlman <[email protected]> wrote ----

In that case, I'll see what I can do to make this work for you.

Reply to this email directly or view it on GitHub.

DamonOehlman added a commit to DamonOehlman/findme that referenced this issue May 19, 2014
@DamonOehlman
Copy link
Member

@MatthiasHild while I can't promise anything (still cleaning up), this may well be fixed. You'll definitely want to do a fresh install of interleave to get [email protected] which contains the fix.

@esc-mhild
Copy link
Author

Many thanks! We'll take it for spin.

M.

---- On Mon, 19 May 2014 09:30:13 -0400 Damon Oehlman <[email protected]> wrote ----

@MatthiasHild while I can't promise anything (still cleaning up), this may well be fixed. You'll definitely want to do a fresh install of interleave to get [email protected] which contains the fix.

Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants