简体   繁体   English

将Eclipse Palantir TypeScript插件与JSPM结合使用

[英]Using Eclipse Palantir TypeScript Plug-in with JSPM

I am using the Palantir Eclipse TypeScript Plug-in (v1.8.0.v20160223-1645), it works fine as long as my d.ts files are in the same source folder /src but due to JSPM they are in another folder and it cannot find and import the modules anymore: 我正在使用Palantir Eclipse TypeScript插件 (v1.8.0.v20160223-1645),只要我的d.ts文件位于同一源文件夹/src ,它就可以正常工作, 但是由于JSPM,它们位于另一个文件夹中,并且无法再找到和导入模块:

/src                      <-- My .ts files are here (no js here)
/dist                     <-- This is where the transpiled js ends up
/jspm_packages/npm        <-- External d.ts files are here

In the project TypeScript properties (Eclipse UI), I have: 在项目的TypeScript属性(Eclipse UI)中,我具有:

Source folder(s):       src
Exported folders(s):    src;jspm_packages/npm
Output folder:          dist
Output file name:       (nothing here)

So in com.palantir.typescript.prefs there is: 因此,在com.palantir.typescript.prefs有:

...
build.path.exportedFolder=src; jspm_packages/npm
build.path.sourceFolder=src
compiler.outputDirOption=dist
...

(author of Eclipse TypeScript here) I think you'll want to add jspm_packages/npm to the source folders. (这里是Eclipse TypeScript的作者)我想您想将jspm_packages / npm添加到源文件夹中。 You probably don't need the exported folders - those are for exporting things out of a project and only get used in multi-project workspaces where projects depend upon one another. 您可能不需要导出的文件夹-这些文件夹用于将项目导出到项目中,并且仅在项目相互依赖的多项目工作空间中使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM