Run grunt task with target/argument in VSCode

Viewed 1291

I have VSCode version 1.18.1, and this in my Gruntfile.js

grunt.registerTask('release', 'Release process', function(target) {
    ...
}

The target is there so that I can run grunt release:one or grunt release:two. However, I can't figure out how to make VSCode run the task with the one|two target.

This is tasks.json file VSCode created with Grunt task auto detected.

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "type": "grunt",
        "task": "release",
        "problemMatcher": [],
        "label": "Release Process",
        "group": {
            "kind": "build",
            "isDefault": true
        }
    }
]
}

If I put release:one to the task attribute of the tasks.json file, VSCode will complain with something like

Error: The grunt task detection didn't contribute a task for the following configuration:

Anyone has done something similar to this? Can you please guide me on how to do it?

Thank you!

1 Answers
Related