sylius / bootstrap-theme
Sylius的Bootstrap主题
v1.1.0
2024-06-05 18:03 UTC
Requires
- php: ^8.0
- sylius/sylius: 1.12.* || 1.13.*
- symfony/webpack-encore-bundle: ^1.12
Requires (Dev)
- behat/behat: ^3.13.0
- behat/mink-selenium2-driver: ^1.4
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- friendsofsymfony/oauth-server-bundle: ^1.6 || >2.0.0-alpha.0 ^2.0@dev
- friendsoftwig/twigcs: ^6.4
- sylius-labs/coding-standard: ^4.0
- symfony/browser-kit: ^5.4
- symfony/debug-bundle: ^5.4
- symfony/dotenv: ^5.4
- symfony/intl: ^5.4
- symfony/web-profiler-bundle: ^5.4
- vimeo/psalm: 4.7.1
README
SyliusBootstrapTheme
Sylius Bootstrap主题,基于Webpack Encore构建过程。
预览
主页

检出
产品
购物车
用户账户
安装
安装主题有两种方式。可以复制文件到themes/
,或者将此包作为composer依赖项添加并创建子主题。以下说明针对在主题文件夹中安装。
Composer安装
作为composer依赖项安装的说明在这里
composer require sylius/bootstrap-theme:1.12
手动安装
1. 将存储库中的文件复制到./themes/BootstrapTheme
要复制的文件/文件夹
assets
templates
composer.json
webpack.config.js
2. 安装node依赖项
yarn install yarn add bootstrap@^5.3 @fortawesome/fontawesome-free@^6.4.2 lightbox axios @popperjs/core@^2.11 glightbox
3. 在您的./webpack.config.js
中导入bootstrap-theme
配置
+ const bootstrapTheme = require('./themes/BootstrapTheme/webpack.config'); // ... - module.exports = [shopConfig, adminConfig, appShopConfig, appAdminConfig]; + module.exports = [shopConfig, adminConfig, appShopConfig, appAdminConfig, bootstrapTheme];
4. 编辑项目配置
# ./config/packages/assets.yaml framework: assets: packages: + bootstrapTheme: + json_manifest_path: '%kernel.project_dir%/public/themes/bootstrap-theme/manifest.json'
# ./config/packages/webpack_encore.yaml webpack_encore: output_path: '%kernel.project_dir%/public/build' builds: + bootstrapTheme: '%kernel.project_dir%/public/themes/bootstrap-theme'
5. 构建资源
# compile assets once yarn dev # recompile assets automatically when files change yarn watch # create a production build yarn build
6. 在管理面板中更改主题
- 转到
配置 > 渠道
- 从列表中编辑所需的渠道
- 转到
外观 > 主题
部分 - 将主题更改为
Sylius Bootstrap主题
贡献
快速开始安装
本地主机
此命令将安装所选版本的Sylius和Bootstrap主题及其配置。您只需在管理面板中按上述方式激活主题即可。
ℹ️ 要设置插件数据库,请记住在install/Application/.env.local
和/或install/Application/.env.test.local
中配置数据库凭证。
$ make install -e SYLIUS_VERSION=XX SYMFONY_VERSION=YY PHP_VERSION=ZZ
默认值:XX=1.12.0,YY=6.3,ZZ=8.2
ℹ️ 要重置(删除数据库和文件)测试环境
$ make reset