This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
nodejs-razor/init.js

15 lines
347 B
JavaScript
Raw Normal View History

2022-10-25 01:00:01 +03:00
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;
};