magepwa-cli
v0.3.0
Published
CLI to bootstrap Magento PWA Studio and apply custom scaffolds
Maintainers
Readme
MagePWA CLI
A powerful CLI tool to enhance existing Magento PWA Studio projects with custom scaffolds and development features.
🎯 Why MagePWA CLI?
Magento PWA Studio's targetables system can be complex and hard to debug. MagePWA CLI provides a simpler component override approach that offers:
- ✅ Clear Code Paths: Direct file-based overrides that are easy to follow and debug
- ✅ Better Maintainability: Simple file structure that's easy to understand and modify
- ✅ Improved Developer Experience: Familiar patterns that any React developer can quickly grasp
- ✅ Enhanced Debugging: Clear stack traces and straightforward code navigation
🚀 Features
- Project Enhancement: Add pre-configured files and structure to existing Magento PWA projects
- Regions Manager Components: Ready-to-use District and SubDistrict components with GraphQL integration
- Tax Invoice Components: Complete tax invoice form with validation and GraphQL integration
- Free Gift Components: Complete free gift selection system with popup interface and promotion management
- Override System: Ready-to-use override directories for venia-ui, peregrine, and pagebuilder
- Store Context: Global store configuration context for easy access throughout your app
- Tailwind Integration: Pre-configured Tailwind CSS setup with custom theme configuration
- Import Aliases: Clean import paths with webpack aliases for better code organization
📦 Installation
npm install -g magepwa-cli🛠️ Quick Start
1. Initialize your Magento PWA project
# Navigate to your existing Magento PWA project
cd your-magento-pwa-project
# Add scaffolds and configurations
magepwa init2. Add components (optional)
# Copy regions scaffold to your project
magepwa regions
# Copy tax invoice components
magepwa tax-invoice
# Copy free gift components (requires Amasty Free Gift extension)
magepwa freegift3. Available Commands
magepwa init # Add scaffolds to existing Magento PWA project
magepwa regions # Copy regions manager scaffold files
magepwa tax-invoice # Copy tax invoice scaffold files
magepwa freegift # Copy free gift scaffold files (requires Amasty extension)
magepwa doctor # Check environment prerequisites
magepwa --help # Show help information📋 Requirements
- Node.js >= 18.0.0
- npm or yarn package manager
- npx (usually included with npm)
📚 Documentation
For detailed documentation, examples, and advanced usage, visit our GitHub Pages documentation.
The documentation includes:
- Complete setup guides
- Override system details
- Import aliases reference
- Build configuration options
- Regions components usage
- Tax invoice components usage
- Free gift components usage
- Store context implementation
- Troubleshooting guide
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📞 Support
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the Magento PWA community
