mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
refactor(ts): add warning for nuxt-ts deprecation (#5301)
This commit is contained in:
parent
665f15ad36
commit
a11afd4537
@ -1,5 +1,46 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const boxen = require('boxen').default
|
||||
const chalk = require('chalk').default
|
||||
|
||||
const warningBox = boxen([
|
||||
chalk.yellow.bold('IMPORTANT : Package deprecation'),
|
||||
'',
|
||||
`Nuxt TypeScript Support has been refactored to be used with ${chalk.green.bold('nuxt')} package.`,
|
||||
`Which means that ${chalk.yellow.bold(`nuxt-ts`)} package is now no longer needed and is now tagged as ${chalk.yellow.bold('deprecated')}.`,
|
||||
`${chalk.bold.underline('We highly recommend')} to follow the guidelines below :`,
|
||||
'',
|
||||
chalk.yellow.bold('Migration guide (2.5.x)'),
|
||||
'',
|
||||
chalk.bold('Using yarn'),
|
||||
'yarn remove nuxt-ts',
|
||||
'yarn add nuxt',
|
||||
'yarn add -D @nuxt/typescript',
|
||||
'',
|
||||
chalk.bold('Using npm'),
|
||||
'npm uninstall nuxt-ts',
|
||||
'npm install nuxt',
|
||||
'npm install -D @nuxt/typescript',
|
||||
'',
|
||||
` ----- ${chalk.bold('nuxt.config.ts')} -----`,
|
||||
'| build: { |',
|
||||
`| ${chalk.red('-- useForkTsChecker: ...')} |`,
|
||||
`| ${chalk.green('++ typescript : {')} |`,
|
||||
`| ${chalk.green('++ typeCheck: ...')} |`,
|
||||
`| ${chalk.green('++ }')} |`,
|
||||
'| } |',
|
||||
' --------------------------',
|
||||
'',
|
||||
'Find more information in updated docs : ' + chalk.blue.underline('https://nuxtjs.org/guide/typescript')
|
||||
].join('\n'), Object.assign({
|
||||
borderColor: 'yellow',
|
||||
borderStyle: 'round',
|
||||
padding: 1,
|
||||
margin: 1
|
||||
})) + '\n'
|
||||
|
||||
process.stdout.write(warningBox)
|
||||
|
||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||
require('@nuxt/cli' + suffix).run()
|
||||
.catch((error) => {
|
||||
|
Loading…
Reference in New Issue
Block a user