requirejs-intellisense icon indicating copy to clipboard operation
requirejs-intellisense copied to clipboard

Any way to get this to run in Visual Studio 2012 RC?

Open mariusfilipowski opened this issue 12 years ago • 3 comments

I really miss Intellisense in require-JS Modules (defines and requires). So I happily found this extension but it doesn't work in VS 2012 RC. Is there any fix planned?

Also I am working with the 2.0.x Version of Require.. Does this make any difference? I noticed the sample code seems to use the 1.0.x version...

mariusfilipowski avatar Aug 02 '12 13:08 mariusfilipowski

I have a VM set up to try to get this to work now, but I'm still new to debugging *.intellisense.js files, so if anyone has pointers on how to get that going, that is appreciated. While I may be able to search for more info, I'm trying to ship a few different project releases, so do not mind someone giving me some direct pointers to save me some time.

jrburke avatar Aug 13 '12 18:08 jrburke

It's working for me in Visual Studio 2012 RTM. However, see my ginormous comment for details: https://github.com/jrburke/requirejs-intellisense/commit/c214216e5eece2114f42c513e46f604d33699184

I should note though that it's currently only working for me inside of require(). define() doesn't work yet.

orand avatar Aug 18 '12 08:08 orand

Actually, I take that back, define() is sort of working correctly in the following code:

define("foo", ["jquery"], function($) {
    $. // this works
    return { myProp: "prop" };
});

require(["jquery", "foo"], function ($, foo) {

});

However, if you comment out the require() code, the Intellisense in the define() no longer works. It appears you need to have already loaded the module with a require() before it will work in a define(), but I could be wrong.

orand avatar Aug 18 '12 08:08 orand