设置Aurelia、TypeScript和;Net核心RC2

设置Aurelia、TypeScript和;Net核心RC2,typescript,aurelia,jspm,Typescript,Aurelia,Jspm,我正在尝试使用Aurelia和Typescript建立一个新项目 我遵循了我能在网上找到的最新方向。使用vs模板创建项目后,我在项目根目录中运行jspm init,并将baseurl配置为wwwroot。我遇到的第一个问题是VS拒绝将jspm_包作为项目中的文件夹。因此,我再次运行了jspm,并将packages文件夹更改为wwwroot/lib。 这似乎可行,但typescript不允许我导入任何Aurelia包。我下载了骨架项目进行比较。我注意到两件事,骨架使用了比我使用jspm安装时更旧的

我正在尝试使用Aurelia和Typescript建立一个新项目

我遵循了我能在网上找到的最新方向。使用vs模板创建项目后,我在项目根目录中运行jspm init,并将baseurl配置为wwwroot。我遇到的第一个问题是VS拒绝将jspm_包作为项目中的文件夹。因此,我再次运行了jspm,并将packages文件夹更改为wwwroot/lib。
这似乎可行,但typescript不允许我导入任何Aurelia包。我下载了骨架项目进行比较。我注意到两件事,骨架使用了比我使用jspm安装时更旧的Aurelia版本。其次,软件包与.d.ts文件一起下载。我怀疑丢失的.d.ts文件导致intellisense出现问题

到目前为止,我还不知道如何让jspm给我提供旧版本,我尝试更改package.json文件以匹配skeleton应用程序中的内容,但当我运行jspm安装时,我总是得到最新版本


是否已从jspm包中删除打字?让这项工作正常进行的正确工作流程是什么

处理打字脚本打字的最佳实践是打字模块,以前是DefinitelyTyped。首先,通过从命令行运行
npm install Typings--global
来安装Typings

接下来,在项目根目录中创建一个包含以下依赖项的
typings.json
文件:

typings.json

{
  "name": "my-project",
  "globalDependencies": {
    "aurelia-binding": "github:aurelia/binding/dist/aurelia-binding.d.ts#69d54dbebafe87738f89b8ac4109921544d202cb",
    "aurelia-bootstrapper": "github:aurelia/bootstrapper/dist/aurelia-bootstrapper.d.ts#111ee4eb1e5df7af39305d190d635df7d93cb7e5",
    "aurelia-dependency-injection": "github:aurelia/dependency-injection/dist/aurelia-dependency-injection.d.ts#dcb53d40d128f5ff89c6bafa587128583529bd68",
    "aurelia-event-aggregator": "github:aurelia/event-aggregator/dist/aurelia-event-aggregator.d.ts#7a38c51dc9082175461e2d0b21a4c0a9242a8925",
    "aurelia-fetch-client": "github:aurelia/fetch-client/dist/aurelia-fetch-client.d.ts#a97fa7b9484cd78d986b11e537394400c99d02fe",
    "aurelia-framework": "github:aurelia/framework/dist/aurelia-framework.d.ts#e008c4a98147ae39556892a69e5c165947e293a7",
    "aurelia-history": "github:aurelia/history/dist/aurelia-history.d.ts#21e1ecd279b5b6d7525103cf734318103aee5382",
    "aurelia-history-browser": "github:aurelia/history-browser/dist/aurelia-history-browser.d.ts#19e095308a414ab561d3c5b327fcbc756e60f457",
    "aurelia-loader": "github:aurelia/loader/dist/aurelia-loader.d.ts#5bc0bf9424946235bc6d63ce77f4a6b97b0b4742",
    "aurelia-logging": "github:aurelia/logging/dist/aurelia-logging.d.ts#62417b8db6b82ef9c4dfe09eeca5cef6714e3b40",
    "aurelia-logging-console": "github:aurelia/logging-console/dist/aurelia-logging-console.d.ts#a82125fb35a1efc6372c40b7cd5813cfbda1eb11",
    "aurelia-metadata": "github:aurelia/metadata/dist/aurelia-metadata.d.ts#96c4c332fe4669e11b7570d3e8996cced9cf9042",
    "aurelia-pal": "github:aurelia/pal/dist/aurelia-pal.d.ts#adc7e905abf4f76d1c71a19f740cb6bb45d5842e",
    "aurelia-pal-browser": "github:aurelia/pal-browser/dist/aurelia-pal-browser.d.ts#ce3451eeeb2feb2c62ec30ec3f6a0122b4209282",
    "aurelia-path": "github:aurelia/path/dist/aurelia-path.d.ts#762d6dd77200672080e6a24e6db9ab37b0dc6137",
    "aurelia-polyfills": "github:aurelia/polyfills/dist/aurelia-polyfills.d.ts#e97d36f958436057ff277c00ce58a0edf42adfed",
    "aurelia-route-recognizer": "github:aurelia/route-recognizer/dist/aurelia-route-recognizer.d.ts#2c89fa3ffd739262cc8f901514f314a25f21c9c1",
    "aurelia-router": "github:aurelia/router/dist/aurelia-router.d.ts#39f05b6c85925829baa8be1256fc9ee9430e5854",
    "aurelia-task-queue": "github:aurelia/task-queue/dist/aurelia-task-queue.d.ts#18ac85b517430a3ad8a390cc6bb114abad499bb1",
    "aurelia-templating": "github:aurelia/templating/dist/aurelia-templating.d.ts#aad25d550f316ac2d7cac29c330059897c7d15bd",
    "aurelia-templating-binding": "github:aurelia/templating-binding/dist/aurelia-templating-binding.d.ts#f90d1082b0aa3be71c23e26c1e152b22593a15b5",
    "aurelia-templating-resources": "github:aurelia/templating-resources/dist/aurelia-templating-resources.d.ts#98f81efd2d7270742bfaa1f3c37d8a71a3936172",
    "aurelia-templating-router": "github:aurelia/templating-router/dist/aurelia-templating-router.d.ts#68460e0398f896c5883be81588bdd5f3855f05c3"
  }
}
最后,通过从命令行运行
typings install
来安装类型


我包含了一步一步的内容,因为这是一件棘手的事情,可复制/粘贴的答案通常很有帮助。如上面的评论所述,有关此更改的更多信息可在以下博文中找到:

是的,请使用此博文中所述的打字方式:如果有帮助,请务必接受并投票谢谢!昨天我花了很多时间在谷歌上搜索,却一直没有找到那篇博文。我想这都是为了找到合适的关键词。非常感谢!