Skip to content
Permalink
Browse files

fix(nuxt-ts): error catch in nuxt-ts binary (#5086)

* fix: nuxt-ts binary error catch

* test: update cli snapshot
  • Loading branch information...
kevinmarrec authored and Atinux committed Feb 25, 2019
1 parent 4b82aa9 commit 4f887f6963a224726111bf7c98014e1b7296fef3
Showing with 20 additions and 18 deletions.
  1. +6 −4 distributions/nuxt-ts/bin/nuxt-ts.js
  2. +14 −14 packages/cli/test/unit/__snapshots__/command.test.js.snap
@@ -11,9 +11,11 @@ const tsConfigPath = resolve(rootDir, 'tsconfig.json')

const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''

require('@nuxt/typescript' + suffix).setup(tsConfigPath).then(() => {
require('@nuxt/cli' + suffix).run()
}).catch((error) => {
const errorHandler = (error) => {
require('consola').fatal(error)
process.exit(2)
})
}

require('@nuxt/typescript' + suffix).setup(tsConfigPath).then(() => {
require('@nuxt/cli' + suffix).run().catch(errorHandler)
}).catch(errorHandler)
@@ -1,36 +1,36 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`cli/command builds help text 1`] = `
" Usage: nuxt this is how you do it
" Usage: nuxt this is how you do it
[options]

a very long description that should wrap
to the next line because is not longer
a very long description that should wrap
to the next line because is not longer
than the terminal width

Options:

--spa, -s Launch in SPA mode
--universal, -u Launch in Universal
--universal, -u Launch in Universal
mode (default)
--config-file, -c Path to Nuxt.js
--config-file, -c Path to Nuxt.js
config file (default: nuxt.config.js)
--modern, -m Build/Start app for
modern browsers, e.g. server, client and
--modern, -m Build/Start app for
modern browsers, e.g. server, client and
false
--force-exit Whether Nuxt.js
should force exit after the command has
--force-exit Whether Nuxt.js
should force exit after the command has
finished
--version, -v Display the Nuxt
--version, -v Display the Nuxt
version
--help, -h Display this message
--port, -p Port number on which
--port, -p Port number on which
to start the application
--hostname, -H Hostname on which to
--hostname, -H Hostname on which to
start the application
--unix-socket, -n Path to a UNIX socket
--foo very long option that
is longer than the terminal width and
--foo very long option that
is longer than the terminal width and
should wrap to the next line

"

0 comments on commit 4f887f6

Please sign in to comment.
You can’t perform that action at this time.