Skip to content

Commit

Permalink
feat: ADD option to disable auto-refresh. [closes #124]
Browse files Browse the repository at this point in the history
  • Loading branch information
spmeesseman committed Feb 6, 2021
1 parent 79695f0 commit 82aa4bd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,11 @@
"title": "%config.taskExplorer.numLastTasks%",
"description": "%config.taskExplorer.numLastTasksDsc%"
},
"taskExplorer.autoRefresh": {
"type": "boolean",
"default": true,
"description": "%config.taskExplorer.autoRefresh%"
},
"taskExplorer.debug": {
"type": "boolean",
"default": false,
Expand Down
2 changes: 2 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

"config.taskExplorer.exclude": "Configure glob patterns for folders and files that should be excluded from script detection.",

"config.taskExplorer.autoRefresh": "Auto refresh the task trees when a task file is modified.",

"config.taskExplorer.enableNpm": "NPM - Enable",
"config.taskExplorer.enableNpmDsc": "Enable/show npm scripts as tasks.",

Expand Down
4 changes: 4 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ async function processConfigChanges(context: ExtensionContext, e: ConfigurationC
{
let refresh: boolean;

if (configuration.get<boolean>("autoRefresh") === false) {
return;
}

if (e.affectsConfiguration("taskExplorer.exclude")) {
refresh = true;
}
Expand Down

0 comments on commit 82aa4bd

Please sign in to comment.