Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-4814 Looking at Gulp/Jake/Grunt plugins extensions. #4926

Merged
merged 1 commit into from
Apr 17, 2019
Merged

Conversation

lmcbout
Copy link
Contributor

@lmcbout lmcbout commented Apr 16, 2019

Fixes #4814
It is possible to have tasks with the same type, so we need to
differentiate them.
Using the handle available with the task to create a unique provider.
This allow to have following plugins within the same workspace:

  • grunt
  • gulp
  • jake

Jake is using the old API to computeTask(). Because of that, I need to implement the deprecated Task constructor to handle Jake.
To support the vscode built-in plugin for JAKE , there is two ways:
1- I need to implement the deprecated Task constructor to handle Jake.
2- Jake vscode built-in plugin needs to be adjusted to handle the creation of task using the newest API

In the current solution, I implemented solution 1, so we can support JAKE until vscode modify the Jake plugin

For solution 2, we need to modify:
File: jake/src/main.ts
Method computeTasks() at ~line 145, need to modify the following line by adding the workspaceFolder as a parameter:

OLD:
let task = new vscode.Task(kind, taskName, 'jake', new vscode.ShellExecution(${jakeCommand} ${taskName}, options));

NEW:
let task = new vscode.Task(kind, this._workspaceFolder, taskName, 'jake', new vscode.ShellExecution(${jakeCommand} ${taskName}, options));

For testing purpose, you need to add in the package.json the following packages. (Either in devDependencies or dependencies)
"dependencies": {
"gulp": "latest",
"gulp-util": "latest",
"gulp-sass": "latest",
"gulp-coffee": "latest",
"gulp-uglify": "latest",
"gulp-concat": "latest",
"gulp-connect": "latest",
"grunt": "~0.4.5",
"grunt-cli": "^1.3.2",
"grunt-contrib-jshint": "~0.6.4",
"grunt-contrib-nodeunit": "~0.2.0",
"grunt-contrib-watch": "~0.5.3",
"jake": "^8.1.1"
}
With those packages installed, you can test "Gulp", Grunt", "Jake" and "npm" if installed

Signed-off-by: Jacques Bouthillier jacques.bouthillier@ericsson.com

It is possible to have tasks with the same type, so we need to
differentiate them.
Using the handle available with the task to create a unique provider.
This allow to have following plugins within the same workspace:
- grunt
- gulp
- jake

Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>
Copy link
Contributor

@elaihau elaihau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with Gulp, Jake, Grunt, and npm extensions in my local env. Looks good. Thank you !

@lmcbout lmcbout merged commit 992436b into master Apr 17, 2019
@lmcbout lmcbout deleted the GH-4814 branch April 17, 2019 18:54
@elaihau
Copy link
Contributor

elaihau commented Apr 29, 2019

this pr is part of #4216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load built-in vscode plugins to Theia: grunt, gulp, jake
4 participants