mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 17:14:50 +00:00
* feat: prefs frontend * fix: DI issue * fix: lint * feat: appearance settings cleanup + fix settings, remove pinia * fix: sync btn when logged out * fix: prepr * fix: sidebar issue * feat: language coverage + cleanup * feat: cleanup lang settings * fix: fmt * fix: CI * fix: ci * fix: storybook * feat: bring back loader/game version sort --------- Co-authored-by: tdgao <mr.trumgao@gmail.com>
28 lines
665 B
JavaScript
28 lines
665 B
JavaScript
#!/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(
|
|
process.execPath,
|
|
['--disable-warning=MODULE_TYPELESS_PACKAGE_JSON', scriptPath, ...args],
|
|
{
|
|
stdio: 'inherit',
|
|
},
|
|
)
|
|
|
|
child.on('exit', (code) => {
|
|
process.exit(code ?? 0)
|
|
})
|