智能感知,在 Visual Studio 2012 中使用 RequireJS 自动完成 [英] Intellisense, auto completion with RequireJS in visual studio 2012

查看:25
本文介绍了智能感知,在 Visual Studio 2012 中使用 RequireJS 自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在 vs2012 中通过 _referencs.js 支持 javascript 智能感知.目前,我在前端使用 RequireJS,但我想自从我开始使用 RequireJS 以来,我失去了 javascript 中的自动完成支持.

I know javascript intellisense support trough _referencs.js in vs2012. At this moment, I am using RequireJS in my frontend, but I think I lost auto-completion supporting in javascript since I started using RequireJS.

我从 此处 找到了 require.intellisense.js,但不幸的是,在几次之后失败了小时和尝试.

I found require.intellisense.js from here, but, unfortunatelly failed with it after several hours and tries.

有没有人在 vs2012 中使用 RequireJS(2.1.2 版)成功实现自动补全?

Is there anyone succeeded in getting auto-completion with RequireJS(version 2.1.2) in vs2012?

推荐答案

通过遵循此代码项目文章,我让 Intellisense 在 RequireJS 定义的模块中工作:http://www.codeproject.com/Articles/460836/Making-the-most-out-of-JavaScript-智能感知

I got Intellisense to work inside RequireJS defined modules by following this Code Project article: http://www.codeproject.com/Articles/460836/Making-the-most-out-of-JavaScript-Intellisense-in

下载代码在这个链接:https://github.com/chrisprice/PropertyFinder-HTML5/zipball/master具有工作 Intellisense 的解决方案是 iPhone 解决方案.

The download code is at this link: https://github.com/chrisprice/PropertyFinder-HTML5/zipball/master The solution that has the working Intellisense is the iPhone solution.

您需要下载文章中引用的代码并尝试一下.在下载代码和那篇文章之间,您应该能够从那里获取它在您自己的项目中实现 Intellisense.

You'll want to download the code referenced in the article and try it out. Between the download code and that article, you should be able to take it from there to implement Intellisense in your own project.

文章的源代码中有一个 require.intellisense.js 文件,它对正确操作至关重要.我不确定是谁写的,但它与您从 jrburke 引用的不同.

There is a require.intellisense.js file in the source code for the article that is critical to proper operation. I'm not sure who wrote it, but it is different than the one you reference from jrburke.

如果您有任何后续问题,我很乐意提供帮助.

If you have any follow up questions, I'll be happy to help.

这篇关于智能感知,在 Visual Studio 2012 中使用 RequireJS 自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆