Nuxt/distributions/nuxt-ts/bin/nuxt-ts.js

16 lines
457 B
JavaScript
Raw Normal View History

2019-01-04 19:30:28 +00:00
#!/usr/bin/env node
// Globally indicate we are running in ts mode
2019-01-04 19:30:28 +00:00
process.env.NUXT_TS = 'true'
const rootDir = (process.argv[2] && process.argv[2] !== 'dev') ? process.argv[2] : process.cwd()
2019-01-04 19:30:28 +00:00
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)
})