(modulePath)
| 14 | const hsExt = '._hs'; |
| 15 | |
| 16 | function run(modulePath) { |
| 17 | modulePath = path.resolve(modulePath); |
| 18 | const args = { module: { dir: path.dirname(modulePath), id: modulePath } }; |
| 19 | return fs.promises.readFile(modulePath, { encoding: 'utf-8' }) |
| 20 | .then(code => _hyperscript.evaluate(code, {}, args)) |
| 21 | .catch(e => console.error("Cannot execute file:", e)); |
| 22 | } |
| 23 | |
| 24 | _hyperscript.addFeature("require", function parseRequire(parser) { |
| 25 | if (!parser.matchToken("require")) return; |
no test coverage detected