-
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.
- Loading branch information
1 parent
70995fb
commit 6adcc9d
Showing
3 changed files
with
30 additions
and
3 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
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,26 @@ | ||
import { Command } from 'commander' | ||
import { composeCommand } from '../compose' | ||
import { depsCopyCommand } from '../dependencies/copy' | ||
import { copyExampleFilesCommand } from '../environment/copy-example-files' | ||
import { generateDotEnvCommand } from '../environment/generate-dot-env' | ||
import { gitCloneCommand } from '../git/clone' | ||
import { createProjectCommand } from '../project/create' | ||
|
||
export function setupCommand() { | ||
return new Command() | ||
.name('setup') | ||
.alias('init') | ||
.summary('Setup DEMS for a new project and initialize it') | ||
.action(async () => { | ||
await createProjectCommand().parseAsync() | ||
await gitCloneCommand().parseAsync() | ||
|
||
copyExampleFilesCommand().parse() | ||
generateDotEnvCommand().parse() | ||
|
||
composeCommand().parse(['build'], { from: 'user' }) | ||
composeCommand().parse(['up -d'], { from: 'user' }) | ||
|
||
depsCopyCommand().parse() | ||
}) | ||
} |