Silverstripe Version: SS4.13 (but soon to be upgraded to SS5
Question:
I have a project which uses a source theme in dev, then builds completed theme files to use when live - this is currently working just fine, aside from a little composer caveat. I currently have assets for both themes exposed in composer.json, however I’d like to only expose the live theme assets when live.
Is there an extra-dev
or expose-dev
option that works similar to require-dev
in composer.json?
eg. something like this:
"extra": {
"resources-dir": "_resources",
"expose": [
"themes/my_live_theme/assets"
],
"expose-dev": [
"themes/my_source_theme/src/assets",
"themes/my_source_theme/node_modules/bootstrap-icons",
"themes/my_source_theme/node_modules/swiper",
"themes/my_source_theme/node_modules/bootstrap/dist"
],
"project-files-installed": [
"app/.htaccess",
"app/_config.php",
"app/_config/mimevalidator.yml",
"app/_config/mysite.yml",
"app/src/Page.php",
"app/src/PageController.php"
],
"public-files-installed": [
".htaccess",
"index.php",
"web.config"
]
},
Any help or suggestions greatly appreciated!