15 lines
347 B
JavaScript
15 lines
347 B
JavaScript
const { readFile } = require("node:fs/promises");
|
|
let {resolve} = require("node:path");
|
|
|
|
let File = require("./Processor/File");
|
|
|
|
exports.processFile = async path => {
|
|
let absolute = resolve(path);
|
|
let content = await readFile(absolute,"utf8");
|
|
let file = new File();
|
|
file.content = content;
|
|
file.build();
|
|
return file;
|
|
};
|
|
|