mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-25 06:56:40 +07:00
improve vscode launching
This commit is contained in:
parent
4bc8b89b78
commit
31af4e11b1
10 changed files with 252 additions and 76 deletions
|
@ -38,11 +38,14 @@ export class Template<
|
|||
.use(removeFrontmatter)
|
||||
.use(parser);
|
||||
|
||||
this.file = toVFile.readSync(path.join(__dirname, "../../", filename));
|
||||
const dir =
|
||||
process.env.NODE_ENV === "development" ? "../../../" : "../../";
|
||||
|
||||
this.file = toVFile.readSync(path.join(__dirname, dir, filename));
|
||||
const result = processor.processSync(this.file);
|
||||
this.fields = result.data as F;
|
||||
} catch (e) {
|
||||
throw new Error(`Template: ${e.toString()}`);
|
||||
throw new Error(`Template: ${e?.toString()}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue