Skip to content

Commit

Permalink
Remove dev command from CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 committed Jan 15, 2020
1 parent 32966b5 commit 7981d94
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
4 changes: 0 additions & 4 deletions cli/prisma2/src/CLI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export class CLI implements Command {
${chalk.bold('Commands')}
init Setup Prisma for your app
dev Develop your application in watch mode
lift Migrate your datamodel
introspect Get the datamodel of your database
generate Generate Photon
Expand All @@ -87,9 +86,6 @@ export class CLI implements Command {
Initialize files for a new Prisma project
${chalk.dim(`$`)} prisma2 init
Start developing and auto migrating your changes locally
${chalk.dim(`$`)} prisma2 dev
Save your changes into a migration
${chalk.dim(`$`)} prisma2 lift save
`)
Expand Down
19 changes: 19 additions & 0 deletions cli/prisma2/src/Dev.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Command, format } from '@prisma/cli'
import chalk from 'chalk'

export class Dev implements Command {
static new(): Dev {
return new Dev()
}
private constructor() {}
async parse(argv: string[]) {
return format(`
${chalk.redBright('Prisma CLI does not include a \`dev\` command any more right now.')}
If you want to run Prisma Studio, use ${chalk.green('prisma2 studio')}.
If you want to generate the Prisma Client, use ${chalk.green('prisma2 generate')} (or ${chalk.green('prisma2 generate --watch')})
If you want to update your schema, use ${chalk.green('prisma2 introspect')}.
If you want to migrate your database, use ${chalk.green('prisma2 migrate')}.
`)
}
}
3 changes: 2 additions & 1 deletion cli/prisma2/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
} from '@prisma/lift'
import { CLI } from './CLI'
import { Introspect, Init } from '@prisma/introspection'
import { Dev } from './Dev'
import { Version } from './Version'
import { Generate } from './Generate'
import chalk from 'chalk'
Expand Down Expand Up @@ -81,7 +82,7 @@ async function main(): Promise<number> {
}),
'tmp-prepare': LiftTmpPrepare.new(),
introspect: Introspect.new(),
dev: LiftWatch.new(aliases),
dev: Dev.new(),
studio: StudioCommand.new(aliases),
generate: Generate.new(),
version: Version.new(),
Expand Down

0 comments on commit 7981d94

Please sign in to comment.