Skip to content

Commit

Permalink
feat: run with --version flag to display version (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeke authored Feb 9, 2024
1 parent 307b362 commit 1c313d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ const args = minimist(process.argv.slice(2), {
default: {
'run-after-setup': true,
model: 'stability-ai/sdxl'

}
})
args.packageName = args._[0] || 'my-replicate-app'

// Display version number if --version flag is present
if (args.version) {
const { version } = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'))
console.log(version)
process.exit()
}

console.log(`Creating project "${args.packageName}"...`)
console.log(`Model: ${args.model}...`)
console.log('Copying files...')
Expand Down

0 comments on commit 1c313d9

Please sign in to comment.