Arguments to run a TS file.
(&self, script: &str)
| 22 | |
| 23 | /// Arguments to run a TS file. |
| 24 | pub fn run_args(&self, script: &str) -> Vec<String> { |
| 25 | match self { |
| 26 | Self::Bun => vec!["run".into(), script.into()], |
| 27 | Self::Deno => vec!["run".into(), "--allow-all".into(), script.into()], |
| 28 | Self::Node => { |
| 29 | // Node >=22 has native TS support via --experimental-strip-types |
| 30 | vec!["--experimental-strip-types".into(), script.into()] |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | /// The package manager command to use for `npm install`. |
| 36 | /// For Bun/Deno we use their built-in install; for Node we use npm. |