Metadrop / scripthor

Swiss knife of scripts for speed up the development on drupal projects.
1 stars 10 forks source link

Any way to manage multiples themes #5

Open AliagaDev opened 4 years ago

AliagaDev commented 4 years ago

In some scenarios may exists more than one active theme in project, maybe is not neccessary to compile all at the same time, but maybe passing an extra argument to make frontend command to select theme to compile...

omarlopesino commented 4 years ago

I think we could do these changes to the script: 1) At the node container, do a volume for themes/custom folder. 2) The make frontend would allow a parameter to specify which is the theme. If not argument is passed, it will be executed in a default theme, specified in .env

Examples: make frontend dev --> It would compile the default theme. make frontend dev custom_theme It would compile the custom_theme's theme.

idiazroncero commented 4 years ago

I agree with @mistermoper 's solution: default to the .env but add the ability to override the theme directly on the make command.

Nevertheless, I would prefer to put it behind a flag for extra clarity (and not having to remember the order). Something like:

make frontend dev --theme custom_theme make frontend dev -T custom_theme

I personally prefer flags as they are more transparent to the user, but any solution would be fine.