Open szepeviktor opened 2 years ago
Can you please elaborate on this one? This already has the theme in a sub-directory.
The prototype is specifically attempting to design a system where some themes, plugins and other dependencies would be developed as part of the same repo. The reason for that is to avoid the composer version update dance whenever a set of dependencies are updated.
Do you know any projects that do this?
Do you know any projects that do this?
Yes. Timber: https://github.com/timber/starter-theme/tree/2.x
Currently two kind of files are mixed.
package-lock.json
functions.php
Simply create a subdirectory inside the theme and move theme code into that directory: https://github.com/timber/starter-theme/tree/2.x/theme
So clean, @kasparsd. So clean!
π€« WP core's code that finds this subdirectory automatically: https://github.com/WordPress/WordPress/blob/89e99f57a2a175ccb75282d1a7eefb0bfce94bcb/wp-includes/theme.php#L515
e.g.
theme
like in https://github.com/timber/starter-theme/tree/2.xAgain: separation of config files, documents -------------- and -------------- application code.
π¦Έπ»ββοΈ This is a secret WordPress core feature, needs no configuration at all.