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/test.js

15 lines
475 B
JavaScript
Raw Normal View History

2022-10-25 01:00:01 +03:00
let parser = require("./init");
let {writeFile} = require("node:fs/promises");
async function main()
{
let node = await parser.processFile("./source/abc.blade.php");
2022-10-25 01:10:27 +03:00
await writeFile("./source/abc.blade.php.js", node.parsedContent.ast, "utf8");
2022-10-25 01:00:01 +03:00
let result = node.execute({
ebilet: 25
});
await writeFile("./source/abc.blade.php.cache", node.cachedData, "utf8");
await writeFile("./target/abc.html", result, "utf8");
};
process.nextTick(main);