mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 17:43:59 +00:00
17 lines
530 B
JavaScript
Executable File
17 lines
530 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
// Globally indicate we are running in ts mode
|
|
process.env.NUXT_TS = 'true'
|
|
|
|
const nuxtCommands = ['dev', 'build', 'generate', 'start']
|
|
const rootDir = (process.argv[2] && !nuxtCommands.includes(process.argv[2])) ? process.argv[2] : process.cwd()
|
|
|
|
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
|
|
|
require('@nuxt/typescript' + suffix).setup(rootDir).then(() => {
|
|
require('@nuxt/cli' + suffix).run()
|
|
}).catch((error) => {
|
|
require('consola').fatal(error)
|
|
process.exit(2)
|
|
})
|