Nuxt/packages/nitro/src/presets/cli.ts

14 lines
429 B
TypeScript
Raw Normal View History

2020-11-20 00:16:31 +00:00
import consola from 'consola'
import { extendPreset, prettyPath } from '../utils'
2021-01-22 19:55:59 +00:00
import { NitroPreset, NitroContext } from '../context'
2020-11-20 00:16:31 +00:00
import { node } from './node'
2021-01-22 19:55:59 +00:00
export const cli: NitroPreset = extendPreset(node, {
2020-11-20 00:16:31 +00:00
entry: '{{ _internal.runtimeDir }}/entries/cli',
hooks: {
2021-01-22 19:55:59 +00:00
'nitro:compiled' ({ output }: NitroContext) {
2020-11-20 00:16:31 +00:00
consola.info('Run with `node ' + prettyPath(output.serverDir) + ' [route]`')
}
}
})