forked from zignd/HTML-CSS-Class-Completion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetcher.ts
More file actions
25 lines (19 loc) · 825 Bytes
/
fetcher.ts
File metadata and controls
25 lines (19 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use strict';
import * as vscode from 'vscode';
import ParseEngineRegistry from './parse-engines/parse-engine-registry';
class Fetcher {
static async findAllParseableDocuments(): Promise<vscode.Uri[]> {
let include: string = ParseEngineRegistry.supportedLanguagesIds.reduce(
(previousValue: string, currentValue: string, currentIndex: number, array: string[]) => {
previousValue += `**/*.${currentValue}`;
if (currentIndex != array.length - 1) {
previousValue += `, `;
}
return previousValue;
}, "");
let exclude: string = 'node_modules/**/node_modules/**/*';
let uris = await vscode.workspace.findFiles(include, exclude);
return uris;
}
}
export default Fetcher;