mirror of
https://github.com/denoland/deno.git
synced 2025-02-24 22:21:54 -05:00

When using the `--unstable-detect-cjs` flag or adding `"unstable": ["detect-cjs"]` to a deno.json, it will make a JS file CJS if the closest package.json contains `"type": "commonjs"` and the file is not an ESM module (no TLA, no `import.meta`, no `import`/`export`).
24 lines
503 B
JSON
24 lines
503 B
JSON
{
|
|
"tempDir": true,
|
|
"steps": [{
|
|
"if": "unix",
|
|
"args": "compile --allow-read --output main main.js",
|
|
"output": "compile.out"
|
|
}, {
|
|
"if": "unix",
|
|
"commandName": "./main",
|
|
"args": [],
|
|
"output": "output.out",
|
|
"exitCode": 1
|
|
}, {
|
|
"if": "windows",
|
|
"args": "compile --allow-read --output main.exe main.js",
|
|
"output": "compile.out"
|
|
}, {
|
|
"if": "windows",
|
|
"commandName": "./main.exe",
|
|
"args": [],
|
|
"output": "output.out",
|
|
"exitCode": 1
|
|
}]
|
|
}
|