-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6913 from vuestorefront/feat/mage-only
feat: mage only
- Loading branch information
Showing
4 changed files
with
53 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { intro } from '@clack/prompts'; | ||
import { Command } from '@oclif/core'; | ||
import { initLogger } from '../domains/logging/logger'; | ||
import { checkDocker, getMagentoDomainName } from '../domains/magento2/docker'; | ||
import { getMagentoDetails } from '../domains/magento2/functions'; | ||
import { installMagento } from '../domains/magento2/installMagento'; | ||
import { simpleLog } from '../domains/magento2/functions/terminalHelpers'; | ||
import picocolors from 'picocolors'; | ||
import { t } from 'i18next'; | ||
|
||
export default class M2Only extends Command { | ||
static override description = 'Install local Magento 2 instance'; | ||
|
||
static override examples = ['<%= config.bin %> <%= command.id %>']; | ||
|
||
static override flags = {}; | ||
|
||
static override args = []; | ||
|
||
async run(): Promise<void> { | ||
const { writeLog, deleteLog } = initLogger(); | ||
|
||
intro('Welcome to the Magento 2 local instance installer!'); | ||
|
||
await checkDocker(writeLog); | ||
|
||
const { magentoDirName, magentoAccessKey, magentoSecretKey } = | ||
await getMagentoDetails(); | ||
|
||
const magentoDomain = await getMagentoDomainName( | ||
t('command.generate_store.magento.domain') | ||
); | ||
|
||
await installMagento({ | ||
isInstallMagento: true, | ||
magentoDirName, | ||
magentoDomain, | ||
magentoAccessKey, | ||
magentoSecretKey, | ||
writeLog | ||
}); | ||
|
||
deleteLog(); | ||
|
||
simpleLog('Happy coding! 🎉', picocolors.green); | ||
|
||
this.exit(0); | ||
} | ||
} |
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