run method

  1. @override
dynamic run(
  1. String filepath
)
override

Run a JS script which would be find from fileSystems, and the script would be treat as a module.

The result is the default module exports.

Implementation

@override
run(String filepath) {
  String? path = fileSystems.findPath("/", filepath);
  if (path != null) {
    String? code = fileSystems.loadCode(path);
    if (code != null) {
      return wrap(runModule(code, path), this);
    }
  }
}