Skip to main content
Version: v2.x.x

platform

By default, Poku tries to identify the platform automatically, but you can set it manually.

History
VersionChanges
v2.2.0
Support for --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.