jrburke / requirejs-intellisense

Enables Visual Studio Intellisense for RequireJS and AMD modules
47 stars 22 forks source link

What about VS2013 ? #9

Open dotnetwise opened 10 years ago

dotnetwise commented 10 years ago

The readme.md says only 2012 works. Can you upgrade it to 2013 as well, please?

jmatthiesen commented 9 years ago

Hi, @dotnetwise - FYI, we have official support for RequireJS in Visual Studio 2013 now. You can learn more about it at: https://msdn.microsoft.com/en-us/library/dn904583.aspx

marknuzz commented 7 years ago

@jmatthiesen I've been directed to this page many times, but it only covers ASP.NET and .jsproj project types. What if I have a blank solution with simply a set of .js files? Standard intellisense works fine in VS2015, but requirejs does not. Seems like this requirejs-intellisense would still be needed in that case. Do you have any idea what part of it broke with the VS update?

jmatthiesen commented 7 years ago

@Mnuzz - Are you just using solution files in a blank solution?

marknuzz commented 7 years ago

Yes

jmatthiesen commented 7 years ago

If you can get it to work in an ASP.NET project, then you could try putting your files into a blank ASP.NET project. However, does it even work for you in an ASP.NET project? I'm not sure if this can work outside of a project file.

marknuzz commented 7 years ago

Using calls to intellisense.logMessage('foo') within the require.intellisense.js at various points, I confirmed that the file is executing...

jmatthiesen commented 7 years ago

Unfortunately, there are some tricks built into VS to get the configuration file settings to work just right, as if running in a web browser. I haven't had to look at it for a long time, but I expect that we had to assume a project system.

marknuzz commented 7 years ago

I'll see if I can get it to work

marknuzz commented 7 years ago

@jmatthiesen I think the issue was a matter of confusion on my part and possibly some others that may happen across this. The AMD syntax works fine, so this works without the plugin and shows intellisense:

define('module', ['dependency'], function(dependency) {
    dependency.foo // shows intellisense on members of dependency
});

What did not work, however was this:

var dependency = require('dependency');
dependency.foo // does not show intellisense in any situation

A way to show intellisense for this second syntax would be great, but for my own purposes I am fine doing it this way. But it seems like it should be consistent from a design perspective.