platform
By default, Poku tries to identify the platform automatically, but you can set it manually.
History
Version | Changes |
---|---|
v2.2.0 | --node , --bun , and --deno alternative flags. |
CLIβ
# Common usage
npx poku --platform=node ./test
bun poku --platform=bun ./test
deno run npm:poku --platform=deno ./test
# Custom usage
## E.g., when you're developing using a platform, but maintain compatibility with others
npx poku --platform=bun ./test
bun poku --platform=deno ./test
deno run npm:poku --platform=node ./test
# ...
- Alternative flags:
--node
,--bun
, and--deno
.- It's only possible to use one per command.
APIβ
/**
* Force Node.js (or tsx for TypeScript)
*
* @default 'node'
*/
await poku('./test', {
platform: 'node',
});
/**
* Force Bun
*/
await poku('./test', {
platform: 'bun',
});
/**
* Force Deno
*/
await poku('./test', {
platform: 'deno',
});
tip
Useful when there is more than one common platform installed.