/
kopython
/
_hyperscript-node
Обзор
Документация
Войти
/
kopython
/
_hyperscript-node
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
lib/_hs-node.js
8 строк
370 B
Drew McDonald
* real init commit
29 ноя 2022, 02:51
29 ноя 2022, 02:51
43e7026
Код
Авторство
О чём код?
module.exports = function (indexPath, args) { const _hyperscript = require(`${__dirname}/_hyperscript/node-hyperscript.js`); require(`${__dirname}/_hyperscript/hdb.js`)(_hyperscript); const fs = require("fs"); const indexScript = fs.readFileSync(indexPath).toString(); const context = _hyperscript.evaluate(indexScript); context.index(args || undefined); };