yireo / magento2-react-minicart
为 Magento 2 KO 前端添加 React minicart 的模块
0.0.1
2019-03-22 10:07 UTC
Requires
- php: >=7.0.0
- magento/framework: ^100.1|^101.0|^102.0
- yireo/magento2-react: *
Requires (Dev)
- composer/composer: *@dev
This package is auto-updated.
Last update: 2024-09-19 22:06:22 UTC
README
本模块提供基于 React 的 minicart,以替代 Magento 自带的 minicart。请注意,这是一个实验,旨在展示构建 React 组件的简便性。它可用于实际网站,但不提供任何保证。
安装
在安装此模块之前,请先安装 Yireo_React 模块。使用 composer
安装应能立即识别。
使用以下命令将此模块安装到 Magento 2 中
composer config repositories.yireo-react vcs git@github.com:yireo-training/Yireo_React.git
composer config repositories.yireo-react-minicart vcs git@github.com:yireo-training/Yireo_ReactMinicart.git
composer require yireo/magento2-react-minicart:dev-master
bin/magento module:enable Yireo_React Yireo_ReactMinicart
bin/magento setup:upgrade
请务必阅读下面的 使用方法 部分。
使用方法
此模块为 Magento 2 前端添加一个额外的 minicart,基于 ReactJS,并移除了旧组件。这需要将源代码编译成通用 JS 代码。要编译源代码,请按照 Yireo_React
的说明,从 Magento 的根目录编译源代码。
yarn dev