Where is the tasks.json file in vscode?

前端 未结 4 1071
我在风中等你
我在风中等你 2020-12-14 08:27

I just start to use vscode in linux. I know that the build configuration are set in tasks.json. But where does this file locate?

I tried <

4条回答
  •  盖世英雄少女心
    2020-12-14 09:01


    2019 Version

    New tasks version 2.0.0

    Here's how to do it step by step


    I compiled this from the documentation:

    First i tried ⬆︎ ⌘ B ... This didn't work for me (I was following a YouTube tutorial... a bit outdated it seems).

    After looking at the documetation i found that you have to initialize your typescript folder. To do so:

    tsc --init - this will generate a file called tsconfig.json

    The documentation said to run code . after you ran tsc --init. Mine worked without is as well as with it. Feel free to play with it and see what it changes cause i honestly don't know.

    After that, move your mouse up to the toolbar (global Terminal menu.)... underneath the Terminal tab, click on the Configure Default Build Task...

    then click on tsc: build and that will generate your tasks.json

    Note that mine generated without the "version": "2.0.0" line... so if yours did the same that means your hardware is too old and you have to upgrade.... i'm kidding! ... Just add "version": "2.0.0", right above "tasks": [, and then you should be fine.

提交回复
热议问题