@absolute-web/magento 中文文档教程
Vue Storefront 2 integration with Magento
@vue-storefront/magento
这只是 composables 包,您还需要安装其他依赖项。
这个项目是 Vue Storefront 2 的 Magento 2 集成。 此集成由 Caravel 的超级英雄开发❤️
How to start if you want to try out the integration
yarn global add @vue-storefront/cli
vsf init <project_name> && cd <project_name> && yarn && yarn dev
How to start if you want to contribute?
想要贡献吗? 在 我们的 Discord 上的 magento2-vsf2
频道上 Ping 我们!
Requirements:
- NodeJS v16 or later
- Yarn
- Magento >= v2.4.3 instance for GraphQL endpoint
- Change Magento GraphQL Query Complexity and Depth values
不要忘记更改 Magento GraphQL 查询复杂性和深度值 Magento 2 默认的复杂度值较低,为 300,深度值较高,为 20。 Magento 2 - Issue #32427
由于
api-client
实现中的查询和突变的大小,需要进行更改。要进行此更改,您可以使用 Magento 2 模块,它会向您的管理员添加一个配置面板,或者执行这是手动更改的。
要安装 Magento 2 GraphQL Config 模块,请在您的 Magento 安装中执行:
composer require caravelx/module-graphql-config
php bin/magento module:enable Caravel_GraphQlConfig
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
查找有关该模块的更多信息 GraphQl Custom Config
Steps
- Fork the repo
- Clone your fork of the repo
example: git clone https://github.com/vuestorefront/magento2.git cd magento2
- Checkout develop branch
git checkout develop
- Run
yarn
to install dependencies - Define a store running environment by adding a
STORE_ENV
to your running project or execute the codebash $ echo "STORE_ENV=dev" >> .env
- Copy
config/example.json
to an environment named config and update GraphQL Endpointbash $ cp packages/theme/config/example.json packages/theme/config/dev.json
- Update
magentoGraphQl
with url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations."magentoGraphQl": "https://{YOUR_SITE_FRONT_URL}/graphql",
- Build dependencies
yarn build:api-client && yarn build:composables
- Run
yarn dev:theme
to run theme. You can find other commands inpackage.json
- If you need HMR on Api Client/Composables run
yarn dev:api-client
oryarn dev:composables
on a separate terminal window.
Resources
Support
如果您对此集成有任何疑问,我们很乐意在 我们的 Discord 上的 magento2-vsf2
频道上回答.
Contributors ✨
Honorable Mentions
感谢这些优秀的人 ????:
该项目遵循 all-contributors 规范。 欢迎任何形式的贡献!
Vue Storefront 2 integration with Magento
@vue-storefront/magento
This is only the composables package, you need to install the other dependencies also.
This project is a Magento 2 integration for Vue Storefront 2. This integration developed by superheroes from Caravel ❤️
How to start if you want to try out the integration
yarn global add @vue-storefront/cli
vsf init <project_name> && cd <project_name> && yarn && yarn dev
How to start if you want to contribute?
Want to contribute? Ping us on magento2-vsf2
channel on our Discord!
Requirements:
- NodeJS v16 or later
- Yarn
- Magento >= v2.4.3 instance for GraphQL endpoint
- Change Magento GraphQL Query Complexity and Depth values
Don't forget to change the Magento GraphQL Query Complexity and Depth values Magento 2 by default has a lower value for the complexity of 300, and a higher value for the depth of 20. Magento 2 - Issue #32427
The changes are required, due to the size of the queries and mutations in the
api-client
implementation.To do this changes, you can use the Magento 2 module, which adds a configuration panel to your admin, or do this changes manually.
To install the Magento 2 GraphQL Config module, on your Magento installation execute:
composer require caravelx/module-graphql-config
php bin/magento module:enable Caravel_GraphQlConfig
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Find more information about the module GraphQl Custom Config
Steps
- Fork the repo
- Clone your fork of the repo
example: git clone https://github.com/vuestorefront/magento2.git cd magento2
- Checkout develop branch
git checkout develop
- Run
yarn
to install dependencies - Define a store running environment by adding a
STORE_ENV
to your running project or execute the codebash $ echo "STORE_ENV=dev" >> .env
- Copy
config/example.json
to an environment named config and update GraphQL Endpointbash $ cp packages/theme/config/example.json packages/theme/config/dev.json
- Update
magentoGraphQl
with url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations."magentoGraphQl": "https://{YOUR_SITE_FRONT_URL}/graphql",
- Build dependencies
yarn build:api-client && yarn build:composables
- Run
yarn dev:theme
to run theme. You can find other commands inpackage.json
- If you need HMR on Api Client/Composables run
yarn dev:api-client
oryarn dev:composables
on a separate terminal window.
Resources
Support
If you have any questions about this integration we will be happy to answer them on magento2-vsf2
channel on our Discord.
Contributors ✨
Honorable Mentions
Thanks go to these wonderful people ????:
This project follows the all-contributors specification. Contributions of any kind welcome!
你可能也喜欢
- 2dpixels-terminal 中文文档教程
- 2max-express-authenticate 中文文档教程
- 99damage-api 中文文档教程
- @0negativ/hawtio-integration 中文文档教程
- @0xnorman/rust-decimal-js-adapter 中文文档教程
- @36node/template-cra-redux 中文文档教程
- @4success/tunnelhub-sdk 中文文档教程
- @555platform/555parser.ts 中文文档教程
- @aaronellington/npm-style-config 中文文档教程
- @abcnews/mostess 中文文档教程