/
githubmirror
/
solid
Обзор
Документация
Войти
/
githubmirror
/
solid
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/solid-ssr/static/index.cjs
16 строк
574 B
Ryan Carniato
update solid ssr to type module
27 мар 2023, 10:11
27 мар 2023, 10:11
bee730c
Код
Авторство
О чём код?
const path = require("path"); const execFile = require("util").promisify(require("child_process").execFile); const pathToRunner = path.resolve(__dirname, "writeToDisk.cjs"); async function run({ entry, output, url }) { const { stdout, stderr } = await execFile("node", [pathToRunner, entry, output, url, "--trace-warnings"]); if (stdout.length) console.log(stdout); if (stderr.length) console.log(stderr); } module.exports = async function renderStatic(config) { if (Array.isArray(config)) { await Promise.all(config.map(run)); } else await run(config); };