Open dotnetwise opened 10 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
@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?
@Mnuzz - Are you just using solution files in a blank solution?
Yes
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.
Using calls to intellisense.logMessage('foo') within the require.intellisense.js at various points, I confirmed that the file is executing...
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.
I'll see if I can get it to work
@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.
The readme.md says only 2012 works. Can you upgrade it to 2013 as well, please?