Skip to content

Commit

Permalink
chore: reuse package.json logic
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuoushub committed Dec 12, 2023
1 parent 2ea1b6a commit f5d0b80
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/create-redwood-app/src/create-redwood-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ import yargs from 'yargs/yargs'

import { RedwoodTUI, ReactiveTUIContent, RedwoodStyling } from '@redwoodjs/tui'

import { name, version } from '../package'

import {
UID,
startTelemetry,
shutdownTelemetry,
recordErrorViaTelemetry,
packageName,
packageVersion,
} from './telemetry'

const INITIAL_COMMIT_MESSAGE = 'Initial commit'
Expand Down Expand Up @@ -683,7 +684,7 @@ async function createRedwoodApp() {
)

const cli = yargs(hideBin(process.argv))
.scriptName(name)
.scriptName(packageName)
.usage('Usage: $0 <project directory> [option]')
.example('$0 newapp')
.option('typescript', {
Expand Down Expand Up @@ -721,7 +722,7 @@ async function createRedwoodApp() {
type: 'boolean',
describe: 'Skip prompts and use defaults.',
})
.version(version)
.version(packageVersion)

const _isYarnBerryOrNewer = isYarnBerryOrNewer()

Expand Down

0 comments on commit f5d0b80

Please sign in to comment.