From e3941ae31c313648858f17c3954f451068d4c52e Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 1 Aug 2021 20:42:04 +0300 Subject: [PATCH] Update file.js --- scripts/helpers/file.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/helpers/file.js b/scripts/helpers/file.js index 8b1f96c5db..cb946c3378 100644 --- a/scripts/helpers/file.js +++ b/scripts/helpers/file.js @@ -1,5 +1,6 @@ -const fs = require('fs') +const markdownInclude = require('markdown-include') const path = require('path') +const fs = require('fs') const rootPath = path.resolve(__dirname) + '/../../' const file = {} @@ -30,8 +31,8 @@ file.create = function (filename, data = '') { fs.writeFileSync(rootPath + filename, data) } -file.compileMarkdown = function (filepath) { - return markdownInclude.compileFiles(path.resolve(__dirname, filepath)) +file.compileMarkdown = function (filename) { + markdownInclude.compileFiles(rootPath + filename) } module.exports = file