-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added auto generated env-example file with generate command
- Loading branch information
Showing
8 changed files
with
1,387 additions
and
1,436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TEST= | ||
TEST1= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Command from '../command' | ||
import { generateEnvExampleFile } from '../../handler/envHandler' | ||
import chalk from 'chalk' | ||
import { consola } from 'consola' | ||
|
||
export default class RestoreCommand extends Command { | ||
protected async beforeExecute (): Promise<any> { | ||
const isConfirmed = await this.askForConfirmation() | ||
|
||
if (!isConfirmed) { | ||
console.log(`Operation is ${chalk.red('cancelled!')}`) | ||
} | ||
} | ||
|
||
protected async onExecute (beforeExecuteReturnValue: any): Promise<void> { | ||
const isSuccess = await generateEnvExampleFile() | ||
|
||
isSuccess | ||
? consola.success('Env example was creating successfully. You are ready to go!') | ||
: consola.error('There was a problem generate .env-example file.') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.