Closed doghap closed 7 years ago
Actually theme.json files are optionaly. You can move all your settings in the config\themes.php file and remove json files. However if you create a theme.json file then it should have all the information needed in order for theme packaging commands to work properly.
The purpose of config\themes.php
is actually to overwrite project-wide the default theme-options that where shiped with a theme (maybe by a third party) without touching the theme itself.
I think its better to inherit assetPath and viewsPath from theme config in themes.php when there is no asset-path and views-path params in theme.json. In consturction of Theme class you just use
and if change to
when we use url() function, it'll find the file in our theme folder, not from the public folder, and there is no need to set the asets path and views path in theme.json file