【发布时间】:2017-06-21 08:42:40
【问题描述】:
我在我的 Typescript 项目中使用 Ubuntu 中的 Visual Studio Code。我想知道是否有可能执行某种“clean”任务。
这是我的tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"tasks": [
{
"taskName": "tsc",
"command": "tsc",
"isShellCommand": true,
"isBackground": true,
"problemMatcher": "$tsc"
},
{
"taskName": "clean",
"linux": {
"command": "rm",
"args": [
"./src/*.js"
],
"isShellCommand": true
},
"isShellCommand": true,
"isBackground": true
}
]
}
这是我的项目结构。
执行task clean 表示没有这样的文件或目录,而执行'pwd' 而不是rm 表示我在项目的根目录中。
任何建议这个构建系统如何工作?也许 VS Code 中的环境变量有一些特殊的语法?
【问题讨论】:
标签: javascript linux typescript visual-studio-code