devex: i18n coverage (#4991)

* devex: i18n coverage

* feat: chalk usage

* feat: exclude legal
This commit is contained in:
Calum H.
2025-12-29 20:41:40 +00:00
committed by GitHub
parent 3e246f12de
commit afe5f773e0
3 changed files with 409 additions and 1 deletions

24
scripts/run.mjs Normal file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env node
import { spawn } from 'child_process'
import { fileURLToPath } from 'url'
import { dirname, join } from 'path'
const __dirname = dirname(fileURLToPath(import.meta.url))
const [scriptName, ...args] = process.argv.slice(2)
if (!scriptName) {
console.error('Usage: pnpm scripts <script-name> [args...]')
console.error('Example: pnpm scripts coverage-i18n --verbose')
process.exit(1)
}
const scriptPath = join(__dirname, `${scriptName}.ts`)
const child = spawn('pnpx', ['tsx', scriptPath, ...args], {
stdio: 'inherit',
shell: true,
})
child.on('exit', (code) => {
process.exit(code ?? 0)
})