The documentation states that gulp and jake files should be autodetected. I have a gulpfile.js in the root of my opened folder, but it is not being autodetected and listed in the task list when I try and run a task. Am I missing something?
gulpfile.js
in the root
npm install -g gulp
:gulp install globally
npm install gulp
: gulp install locally to your dev folder
You need a custom tasks.json
file:
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [
"--no-color"
],
"tasks": []
}
Visual Studio Code with ( tasks.json - version 2.0.0 ). Included gulp task runner. "Ctrl + Shift + B" -> execute tasks in gulpfile.js -> open html file with Chrome browser.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"taskName": "Gulp",
"type": "shell",
"command": "gulp",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always"
}
},
{
"taskName": "Chrome",
"type": "process",
"command": "chrome.exe",
"windows": {
"command": "C:\\Program Files(x86)\\Google\\Chrome\\Application\\chrome.exe"
},
"args": [
"${file}"
]
}
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With