Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.7k views
in Technique[技术] by (71.8m points)

VS Code, Adding taskDefinitions in package.json

I have been attempting to create a VS Code Extension for the Telemark Assembler which is a table driven assembler that targets many different 'vintage' microprocessors. So far I have syntax highlighting and problemMatching working and have things set up so I can publish it to the marketplace. All a very interesting leaning experiance.

I also have a custom build task in my tasks.json like this:

    "tasks": [
        {
            "label": "TBuild",
            "type": "shell",
            "command": "./build.bat",
            "problemMatcher": "$tasm",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]

Since the tasks.json is a per workspace configuration I would like to add this to the package.json for the extension itself so anyone who might also use the extension does not have to set this up manually. I see there is a "taskDefinitions" contribution point but I have found no clear examples of how to set this up for a simple shell script.

It would seem that this might also involve some script definition in the package.json as well but again I have not found any clear and simple examples. Most examples seem to be very 'hand wavy generalizations' or very specific examples involving something like 'rakeFiles' which I don't understand either so it is a bit like trying to learn French by way of Hungarian when you don't know either one.

Any pointers would be appreciated.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...