mirror of
https://github.com/Afilmory/afilmory
synced 2026-05-01 10:16:40 +00:00
19 lines
467 B
TypeScript
19 lines
467 B
TypeScript
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
import { $ } from 'execa'
|
|
|
|
import { precheck } from './precheck'
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
const workdir = path.resolve(__dirname, '..')
|
|
|
|
async function main() {
|
|
await precheck()
|
|
// Get command line arguments excluding node and script name
|
|
const args = process.argv.slice(2)
|
|
await $({ cwd: workdir, stdio: 'inherit' })`vite --host ${args}`
|
|
}
|
|
|
|
main()
|