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

19 lines
420 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'
// https://github.com/TypeStrong/ts-node
require('ts-node').register({
compilerOptions: {
module: 'commonjs'
}
})
2019-01-04 19:30:28 +00:00
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
require('@nuxt/cli' + suffix).run()
.catch((error) => {
require('consola').fatal(error)
process.exit(2)
})