Closed NN--- closed 6 years ago
Hi,
This is supported in a new version of the extension I am hoping to release shortly.
If I get chance I might be able to back port to this version.
Watch this space....
Nick.
Hi @NN---
I have put a change in the current version to now use a gulp install in node_modules. Check out version 0.0.12.
Nick.
It works, but I need gulp to run in terminal same way npm or yarn extensions can do:
Auto detecting gulp for folder abc failed with error: Error: Command failed: node_modules\.bin\gulp.cmd --tasks-simple --no-color
'node' is not recognized as an internal or external command,
operable program or batch file.
Similar to:
"npm.runInTerminal": true,
"yarn.runInTerminal": true,
Hi @NN---
I have had a crack at running the tasks in a terminal -- v0.0.13.
Hopefully it covers what you need. There is a runInTerminal setting that defaults to false. Set that to true and you should be able to do the terminal stuff.
Nick.
I set "gulptasks.runInTerminal": true but still doesn't run in terminal and cannot find node.
Hmm. Have you tried restarting vscode? I have been using it for the last hour or so in both terminal and output. Need to try and work out whats different between out environments.
I tried, didn't help. I have node defined locally for terminal:
"terminal.integrated.env.windows": {
"PATH": "c:\\node\\"
},
OK. I'll investigate.
Hi @NN---
I have spent the last few days trying to get terminal windows and environmental variables working for the extension. Unfortunately, the built in vscode terminal is quite primitive and doesn't provide any process outputs - something I need to build the gulp tasks tree. I also tried to follow the vscode-yarn project recipe and use a third party terminal package, but that failed as well. I therefore don't think I can support your request with terminal windows.
However, I may have implemented a workaround, which has just been released as a revamped v1. I still use node child processes, but now merge any vscode configured environmental paths into the main process ones. That means you can still have your "terminal.integrated.env.windows" setup and it will be used when the gulp processes run.
Have a go and see if it works for you.
Nick.
Thanks for you effort. I have a workaround via opening terminal and running gulp manually. I’ll try the changes you pushed, but if it doesn’t work, it is not a big problem. Thanks
Unfortunately it cannot find node cause I configured it only for terminal and not globally.
operable program or batch file.
Auto detecting gulp for folder test failed with error: Error: Command failed: node_modules\.bin\gulp.cmd --tasks-simple --no-color
'node' is not recognized as an internal or external command,
operable program or batch file.
Perhaps you can add settings "gulp.nodePath" similar to "tslint.nodePath" setting in vscode-tslint ?
OK. I was hoping this block of code would specify where path variables were defined in the workspace settings, that could then be added to the env object for the process. This in turn would allow the process to resolve your custom install of node.
if (process.platform === 'win32') {
this.configKey = 'terminal.integrated.env.windows';
} else if (process.platform === 'darwin') {
this.configKey = 'terminal.integrated.env.osx';
} else if (process.platform === 'linux') {
this.configKey = 'terminal.integrated.env.linux';
}
Looking at the vscode-tslint project, am I correct in understanding that it is actually the node_modules path that is missing? This would mean the NODE_PATH variable needs to be set to the node_modules location in the workspace?
This is output of 'Gulp Auto Detection' . If I open 'Run tasks' I don't see gulp there. only npm and tsc.
Sorry, my bad. Everything working well ! :)
Cool.
Add support for locally installed gulp inside node_modules/.bin/gulp