Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我可以在atom中隐藏typescript自动生成的.js和.map.js文件吗?_Typescript_Atom Editor - Fatal编程技术网

我可以在atom中隐藏typescript自动生成的.js和.map.js文件吗?

我可以在atom中隐藏typescript自动生成的.js和.map.js文件吗?,typescript,atom-editor,Typescript,Atom Editor,有人知道Atom中是否有用于隐藏或分组自动生成文件的插件/选项吗 我想要隐藏/分组的文件是typescript编译器自动生成的(.js和.map.js文件) 如果可能的话,VisualStudio样式的分组将是最好的 我的打字脚本文件 file.ts 产生 file.js file.map.js file.js偶尔读一次很有趣,但一般来说它是自动生成的,我不应该在意它 所以让file.ts成为一个虚拟文件夹 - file.ts - file.js - file.map.js 这将是理想

有人知道Atom中是否有用于隐藏或分组自动生成文件的插件/选项吗

我想要隐藏/分组的文件是
typescript编译器自动生成的(
.js
.map.js
文件)

如果可能的话,VisualStudio样式的分组将是最好的

我的打字脚本文件
file.ts

产生
file.js
file.map.js

file.js
偶尔读一次很有趣,但一般来说它是自动生成的,我不应该在意它

所以让
file.ts
成为一个虚拟文件夹

- file.ts
  - file.js
  - file.map.js
这将是理想的解决方案


简单的隐藏是好的。(隐藏
.js
文件通常不是一个解决方案,因为typescript项目通常混合
.js
.ts
甚至
.tsx
文件)

Atom尊重
.gitignore
并将灰显与项目根目录中的
.gitignore
匹配的任何文件。这应足以忽略生成的文件:

*.js
*.jsx
此外,您的
tsconfig.json
可以将所有文件输出到另一个路径。例如:

{
  "version": "1.6.2",
  "compilerOptions": {
    "outDir": "build"
    "sourceMap": true
  },
  "filesGlob": [
    "./src/**/*.ts",
    "./src/**/*.tsx"
  ]
}

这将通知
tsc
atom typescript
src
中的所有typescript文件输出到
build
中。更妙的是,atom中的树视图组件还有一个设置,即根本不显示被忽略的文件:


这是“隐藏VCS忽略的文件”设置

thx,我已经投票了,但我还不够代表-皮蒂:)@MichaelBilling即使有你的代表,你也应该能够“标记为答案”。@basarat你的权利,我只是个傻瓜!(顺便说一句,这个问题的意思也是。-)对于Atom插件开发人员来说,VisualStudio将同名文件分组的方式是一种狂热的特性。我一点也不喜欢咖啡脚本来扩展我自己。虽然我确实看了一下树视图代码)来添加到这个;如果让Atom打开并修改.gitignore文件,则必须关闭Atom并重新打开以查看更改的效果。是否要将[…]而不是{…}放在FileGlob对象中?存在此功能请求:在功能完成之前,您可以使用包隐藏
*.map.js
文件。这可能是我们目前最好的糟糕解决方案。:)