Giter Club home page Giter Club logo

ddev-woodoo-buildtools-magento's Introduction

[DDEV] Woodoo Frontend Buildtools for Magento & Hyvä

tests Dependencies Last commit date Badge Release-Badge Sponsors Join our Discord


This ddev add-on helps you to manage your theme build processes in Magento easily. You can run a build command to build all your themes or a specific theme. It doesn't matter if the theme is a Magento Standard Theme, a Custom Theme, or a Hyva theme. It automatically takes care of which type of theme you use and builds it for you. If a dependency is missing, Woodoo will install it.

>> Build all your Magento themes at once, with Magic, build with Woodoo!

Supported Versions Status
All Hyvä Versions supported project is maintained
Hyvä Fallback is supported project is maintained
Magento 2 Supported project is maintained
MageOS is supported project is maintained

Getting Started

Installation

1 . Get the latest Version with following command in your ddev project root

Latest stable version (recommended)
ddev get dermatz/ddev-woodoo-buildtools-magento
Latest Developer-Preview (Main-Branch - unreleased) - can be instable!
ddev get https://github.com/dermatz/ddev-woodoo-buildtools-magento/archive/refs/heads/main.tar.gz

2. Start Woodoo INIT to update your ./ddev/config.yaml

Automatically connect to your ddev database to list all available themes and add these to .ddev/config-themes.yaml. Add theme path if possible (can be edit later)

ddev frontend init

3. Edit theme path in .ddev/config-themes.yaml Open .ddev/config-themes.yaml and specify relative path to the theme based on your project structure. (E.g. src/themeVendor/theme ... or app/design/frontend/themeVendor/theme/ ...)

Update Woodoo to latest stable Version

If a newer Release is available you will be notified in you ClI about new versions. To update use ddev frontend-update for the latest stable Version.

  ddev frontend-update

Get Developer Preview

If you want to get the latest developer preview (can be instable) use ddev frontend-update -dev

  ddev frontend-update -dev

Usage

Usage: ddev frontend [command] [option or theme]

Command:
  init, install         Initial Woodoo Setup to read all themes from dataabase and write to .ddev/config-themes.yaml
  help, -help, -h       Displays help page
  version, --version    Show version
  check, selftest       Frontend Self-Test
  frontend-update       Update to the latest Version (stable Version)
  frontend-update -dev  Update to the latest Main-Branch Version (not recommended)
  themes                List all available themes that are configured in .ddev/config-themes.yaml
  build                 Builds all themes that are configured in .ddev/config-themes.yaml
  build -f              Builds all configured themes without yes/no confirmation
  build theme           Build a specific theme
  watch theme           Watch for CSS and JS changes in a specific theme

Option:
  -f                    Force the build command to run without yes/no confirmation

Aliases:
  f, fe

Usage Examples

Here are some usage examples to help you get started:

Building All Themes

To build all themes configured in .ddev/config-themes.yaml, run:

ddev frontend build

Building a Specific Theme

To build a specific theme, use the theme code as an argument:

ddev frontend build <theme_code>

Watching for Changes

To watch for CSS and JS changes in a specific theme, use:

ddev frontend watch <theme_code>

Troubleshooting Tips

  • Ensure that your theme paths in .ddev/config-themes.yaml are correct and relative to your project root.
  • If you encounter any issues, try running ddev frontend selftest to perform a self-check and identify potential problems.

Feature request

Submit your Feature Request by adding a new issue and add a label with feature-request.


Contributing

Contributions are welcome! Please read the Contributing Guidelines first. Feel free to send your improvements as Pull request.


Watch out our Contributers, Tester & Supporter


License

License | by Mathias Elle

ddev-woodoo-buildtools-magento's People

Contributors

dermatz avatar morgy93 avatar tniebergall avatar torhoehn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ddev-woodoo-buildtools-magento's Issues

Command to update theme dependencies

Provide a new command to update theme TailwindCSS dependencies to the latest version for specific theme or all themes with just one command like e.g. update-dependencies

💡 Idea: different update modes...

  • latest version
  • Easy updating taking version prefixes such as ^ or ~

Refactoring

Main-Goal: Increase maintainability and readability

Step 2

  • refactor code and make smaller functions with single job
  • create single files in woodoo_components for each task, group chained tasks

Step 3

  • check possibility to make it more modular (ddev addons) and evaluate to create this tools as a frontend bundle

detailed logging

Add detailed logging options to better monitor the build process and diagnose errors more easily.

missing dependencies are not installed

In my case @hyva-themes/hyva-modules was missing and I got an error during theme build.

I had to manually install the dependencies and it worked flawless afterwards.

Optimize theme build process

When building multiple themes in one Magento instance, the functions clearCache, clearStaticFiles, hyvaConfigGenerate (for Hyva themes) will be run after building each theme. That's not necessary. It would be sufficient and awesome, if woodoo would run these commands only once – after all themes have been built.

Use custom config file for settings

If you execute any DDEV action that alters the config.yaml, the custom themes setting will be removed.

To prevent this from happening a custom config file should be used.

Support for Hyva <1.2 projects

When running ddev frontend build on themes with Hyva <1.2, the styles.css file will not be generated because the script in .ddev/commands/web/woodoo_components/build just runs npm run build which doesn't calls the minify command. It should be npm run build-prod.

It would be awesome if woodoo could automatically detect if the Hyva theme is <1.2 or >=1.2 and run the specific command.

Ask for theme path during install

During frontend install you're asked which themes to add.

Afterwards you must edit the theme paths in config.yaml manually.

It would be great if you could enter the path during the install.

define color assignments

For PR and general understanding, it is necessary to define color assignments so that there is a consistent understanding of when which color is used

  • Cyan for CLI commands
  • Purple for themes
  • Yellow for warnings
  • Red for errors
  • White for general output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.