Wer*_*ria 6 vim nerdtree typescript
我想通过NERDTree中的Typescript转换器隐藏自动生成的文件(.js .js.map).
感谢侯赛因·纳扎尔(Hussein Nazzal),我设法用这种方式解决了它(因为我使用的是Angular2,因此需要注意几个步骤):
通过以下方式将outDir属性添加到tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "system",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"outDir": "buildjs/"
},
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
]
}
Run Code Online (Sandbox Code Playgroud)然后在.vimrc
文件中添加以下内容:
let NERDTreeIgnore=['buildjs$']
Run Code Online (Sandbox Code Playgroud)不要忘了修改index.html
并在附近添加以下行System.import('buildjs/main')
,
System.import('app/main')`
Run Code Online (Sandbox Code Playgroud)添加 System.config
map: {
app: 'buildjs'
}
Run Code Online (Sandbox Code Playgroud)