prestashop/hummingbird 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

prestashop/hummingbird

Composer 安装命令:

composer require prestashop/hummingbird

包简介

Hummingbird development theme for PrestaShop

README 文档

README

CI PrestaShop 9.1+ Docker Ready Node.js v20 License

Hummingbird is a modern, in-development theme for PrestaShop built to be compatible with versions 9.1.x and above.

✅ Compatibility

Hummingbird PrestaShop Status
develop ~10.0.0 Next major
2.x ~9.1.1 Maintained
2.0.0 ~9.1.0 Released

Note

Version ranges follow semver notation: ~X.Y.Z = any patch within X.Y, ^X.Y.Z = any minor/patch within X. This mirrors the to field in config/theme.yml.

🔍 Theme Previews

Homepage Category Product

⚠️ Requirements

To work on Hummingbird, you'll need:

  • Node.js v20.x.
  • npm v8.

📑 Table of Contents

🔨 Develop on Hummingbird

🧰 Installation / Setup

👀 Watch Mode Setup

From the project root run the following commands if you want to:

  1. Install dependencies: npm ci.
  2. Run watch mode to build assets: npm run watch.
  3. You can now go to 🐳 Run Hummingbird with Docker section to run PrestaShop embedding Hummingbird.

🔥 Hot Module Reload (HMR) Setup

  1. From the project root run: npm ci.
  2. Navigate to the webpack/ directory.
  3. Run cp .env-docker-example .env or cp .env-vhost-example .env (depending on how you want to run your PrestaShop environment).
  4. Edit .env with your local environment settings and ensure you use a free TCP port.
  5. From the project root run npm run dev.
  6. You can now go to 🐳 Run Hummingbird with Docker section to run PrestaShop embedding Hummingbird.

🖌️ Code Quality

To ensure code quality and consistency, run the following commands from the project root:

  • Lint & auto-fix SCSS files: npm run stylelint or npm run stylelint:fix.
  • Format & auto-format SCSS with Prettier: npm run prettier or npm run prettier:fix.
  • Lint & auto-fix JS/TS files: npm run lint or npm run lint:fix.

🤖 AI-Assisted Development

Hummingbird V2 is natively optimized for AI-assisted development (vibe coding). We have set up a strict System Context to prevent AI models from hallucinating legacy PrestaShop patterns (like using jQuery or mixing CSS classes with JS logic) and to enforce our modern data-ps-* declarative framework.

How to use AI with this repository:

  • ⚡ Zero-Config IDEs (Cursor, Windsurf, Antigravity, GitHub Copilot): If you use a modern AI-powered editor or CLI (like Claude Code), you have nothing to configure. The repository includes pointer files (.cursorrules, .antigravityrules, etc.) that automatically inject the project's architectural rules into your agent's context. Just open the project and start prompting!
  • 🌐 Web-based Assistants (ChatGPT, Claude.ai, Gemini): If you use a web interface, please open the CONTEXT.md file at the root of this project and copy-paste its content into your initial prompt (or set it as your "System Prompt" for the session).

Warning

Contributor Disclaimer: AI is a powerful co-pilot, but you remain the pilot. Always review the generated code to ensure it strictly follows our accessibility (WAI-ARIA) guidelines and does not introduce legacy code.

🐳 Run Hummingbird with Docker

This theme includes Docker configurations for both PrestaShop and PrestaShop Flashlight development environments.

🛠️ Getting Started

Note: If you've already set up your development environment using Watch Mode or Hot Module Reload (HMR), you can skip ahead to step 3.

  1. From the project root run: npm ci.
  2. Then run: npm run build.
  3. Navigate to the docker/ directory: cd docker.
  4. Copy the example environment file: cp .env-example .env.
  5. Edit .env to configure the following variables:
    • PS_TAG: PrestaShop or Flashlight version tag.
    • PLATFORM: Platform architecture (e.g., linux/amd64, linux/arm64).
    • ADMIN_EMAIL: Back office admin email.
    • ADMIN_PASSWORD: Back office admin password.

📦 Available Configurations

  • docker-compose-prestashop.yml: for standard PrestaShop development environment.
  • docker-compose-flashlight.yml: for PrestaShop Flashlight development environment.

▶️ Starting the Environment

From the project root, run one of the following commands:

# For PrestaShop environment
docker compose -f docker/docker-compose-prestashop.yml up -d

# For Flashlight environment
docker compose -f docker/docker-compose-flashlight.yml up -d

👀 After Starting the Environment

⏹️ Stopping the Environment

From the project root, run one of the following commands:

# For PrestaShop environment
docker compose -f docker/docker-compose-prestashop.yml down -v

# For Flashlight environment
docker compose -f docker/docker-compose-flashlight.yml down

🥵 Troubleshooting

Warning

If you're experiencing issues with styles or assets not updating while using HMR mode, follow these steps to avoid browser and PrestaShop caching problems:

  1. Disable browser cache during development:
    • Open your browser's DevTools.
    • Go to the Network tab.
    • Enable Disable cache (⚠️ this only works while DevTools stays open).
  2. Disable PrestaShop caching:
    • In the back office, go to: Advanced ParametersPerformance.
    • Under the Smarty section:
      • Set Force compilation to Yes.
      • Set Cache to No.
    • Under the CCC (Combine, Compress and Cache) section:
      • Disable all options.

📚 Storybook

Storybook is used to document and preview the theme's UI components during development. You can view the live documentation here. Since the theme is still in progress, contributions to improve or expand the documentation are welcome and encouraged.

▶️ Run Storybook Locally

To run Storybook on your machine:

  1. Make sure project dependencies are installed, if not, from the project root run: npm ci.
  2. Then run: npm run storybook.
  3. Storybook will be available at http://localhost:6006.

🤝 Contributing

Please refer to the contributing guide.

✅ Continuous Integration

The CI runs include Stylelint, Prettier, ESLint, and TypeScript type checks.

🚀 Continuous Deployment

Whenever the develop branch is merged into master, the Storybook documentation is automatically deployed to GitHub Pages and becomes publicly accessible within minutes.

📄 License

This theme is released under the Academic Free License 3.0.

prestashop/hummingbird 适用场景与选型建议

prestashop/hummingbird 是一款 基于 Smarty 开发的 Composer 扩展包,目前已累计 3.57M 次下载、GitHub Stars 达 129, 最近一次更新时间为 2024 年 05 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 prestashop/hummingbird 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 prestashop/hummingbird 我们能提供哪些服务?
定制开发 / 二次开发

基于 prestashop/hummingbird 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3.57M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 129
  • 点击次数: 14
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 129
  • Watchers: 35
  • Forks: 128
  • 开发语言: Smarty

其他信息

  • 授权协议: AFL-3.0
  • 更新时间: 2024-05-20