Skip to content

basalt / cli/src / resolveDevRunner

Function: resolveDevRunner() ​

> resolveDevRunner(entry, options?): DevRunner

Defined in: cli/src/dev.ts:31

Chooses how to run the entry with watch/restart, delegating the actual watching to the runtime (no bespoke watcher). Pure and testable:

  • .ts with tsx available → tsx watch <entry>
  • .ts without tsx → node --watch --experimental-strip-types <entry> (Node ≥ 22.6)
  • .js → node --watch <entry>

Parameters ​

entry ​

string

options? ​

tsx? ​

boolean

Returns ​

DevRunner

Released under the MIT License.