Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Add sample plugin for Task API #33

Merged
merged 1 commit into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions samples/tasks-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
node_modules/
*.theia
10 changes: 10 additions & 0 deletions samples/tasks-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# tasks-plugin

Sample task plugin which includes:

- Providing custom tasks.
- Resolving tasks before starting these ones.
- Ability to listening to events for a task execution starting and completion of an executed task.
- Ability to get currently active task executions.
- Displaying running tasks in the bottom panel.
- Ability to terminate an running task.
39 changes: 39 additions & 0 deletions samples/tasks-plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "tasks-plugin",
"publisher": "theia",
"keywords": [
"theia-plugin"
],
"version": "0.0.1",
"license": "EPL-2.0",

"files": [
"src"
],
"devDependencies": {
"@theia/plugin": "next",
"@theia/plugin-packager": "latest",
"rimraf": "2.6.2",
"typescript-formatter": "7.2.2",
"typescript": "2.9.2",
"ts-loader": "^4.1.0",
"clean-webpack-plugin": "^0.1.19",
"webpack": "^4.1.1",
"webpack-cli": "^3.1.1"
},
"scripts": {
"prepare": "yarn run clean && yarn run build",
"clean": "rimraf lib",
"format-code": "tsfmt -r",
"watch": "webpack-cli -w --config webpack.config.js",
"compile": "webpack-cli --config webpack.config.js",

"build": "yarn run format-code && yarn run compile && theia:plugin pack"
},
"engines": {
"theiaPlugin": "next"
},
"theiaPlugin": {
"frontend": "dist/tasks-plugin-frontend.js"
}
}
8 changes: 8 additions & 0 deletions samples/tasks-plugin/resources/task-long-running
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

for i in {1..200}
do
sleep 1
echo "processing... $i"
done

Loading