Moving away from fs sync methods

This commit is contained in:
Elio Struyf
2022-10-06 21:36:51 +02:00
parent 888e5c5229
commit fad5ad7243
25 changed files with 126 additions and 79 deletions
+3 -3
View File
@@ -77,7 +77,7 @@ export class CustomScript {
articlePath = editor.document.uri.fsPath;
article = ArticleHelper.getFrontMatter(editor);
} else {
article = ArticleHelper.getFrontMatterByPath(path);
article = await ArticleHelper.getFrontMatterByPath(path);
}
if (articlePath && article) {
@@ -119,7 +119,7 @@ export class CustomScript {
if (folder.lastModified.length > 0) {
for await (const file of folder.lastModified) {
try {
const article = ArticleHelper.getFrontMatterByPath(file.filePath);
const article = await ArticleHelper.getFrontMatterByPath(file.filePath);
if (article) {
const crntOutput = await CustomScript.runScript(wsPath, article, file.filePath, script);
if (crntOutput) {
@@ -220,7 +220,7 @@ export class CustomScript {
articlePath = editor.document.uri.fsPath;
article = ArticleHelper.getFrontMatter(editor);
} else {
article = ArticleHelper.getFrontMatterByPath(articlePath);
article = await ArticleHelper.getFrontMatterByPath(articlePath);
}
if (article && article.data) {