Skip to content

Commit

Permalink
chore: improve logs
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Mar 26, 2024
1 parent edf625c commit e9e15d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/commands/deploy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ export default defineCommand({
const deployEnv = git.branch === linkedProject.productionBranch ? 'production' : 'preview'
const deployEnvColored = deployEnv === 'production' ? colors.green(deployEnv) : colors.yellow(deployEnv)
consola.success(`Connected to ${colors.blue(linkedProject.teamSlug)} team.`)
consola.success(`Linked to ${colors.blue(linkedProject.slug)} project.`)
consola.info(`Preparing deployment for ${deployEnvColored}.`)

if (args.build) {
const pkg = await getPackageJson()
const deps = Object.assign({}, pkg.dependencies, pkg.devDependencies)
if (deps.nuxt) {
consola.start('Building the Nuxt project...')
consola.info('Building the Nuxt project...')
await execa('./node_modules/.bin/nuxi', ['build', '--preset=cloudflare-pages'], { stdio: 'inherit' })
.catch((err) => {
if (err.code === 'ENOENT') {
Expand All @@ -89,7 +91,7 @@ export default defineCommand({
throw err
})
} else if (deps.nitropack) {
consola.start('Building the Nitro project...')
consola.info('Building the Nitro project...')
process.env.NITRO_PRESET = 'cloudflare-pages'
await execa('./node_modules/.bin/nitropack', ['build'], { stdio: 'inherit' })
.catch((err) => {
Expand Down

0 comments on commit e9e15d0

Please sign in to comment.