MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / run

Function run

src/platform/node-hyperscript.js:16–22  ·  view source on GitHub ↗
(modulePath)

Source from the content-addressed store, hash-verified

14const hsExt = '._hs';
15
16function 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;

Callers 2

installFunction · 0.70

Calls 2

resolveMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected