Magento 2 部署命令行
在本教程中,我们将讨论如何在命令行系列中部署命令行来执行 Magento 2 功能。如您所知,从 Magento 2 开始,他们在. Magento 开发人员对命令行太熟悉了,但如果您是这个领域的新手。本文将带您更深入地了解 Magento 2 命令行以及如何以易于理解的方式在 Magento 2 中部署它们。bin/magento
让我们开始吧!
部署命令行
命令语法:
php bin/magento setup:static-content:deploy <lang> ... <lang> [--dry-run]
如何运行部署静态内容
php bin/magento setup:static-content:deploy
它将显示如下:
$ php bin/magento setup:static-content:deploy
Requested languages: en_US
=== frontend -> Magento/blank -> en_US ===
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
默认情况下,它将运行默认语言的部署静态内容:en_EN
如果您想部署其他语言的静态内容,例如:pt_BR
php bin/magento setup:static-content:deploy pt_BR
然后得到结果:
Requested languages: pt_BR
=== frontend -> Magento/luma -> pt_BR ===
... progress indicator ...
Successful: 1613 files; errors: 0
=== frontend -> Magento/blank -> pt_BR ===
... progress indicator ...
Successful: 1620 files; errors: 0
=== adminhtml -> Magento/backend -> pt_BR ===
... progress indicator ...
Successful: 1626 files; errors: 0
=== Minify templates ===
... progress indicator ...
Successful: 858 files modified
---
版权声明:本站内容源自互联网,如有内容侵犯了你的权益,请联系删除相关内容。