主题文件夹未公开 - Expose 要求公开未在安装期间创建的文件夹

问题描述

Silverstripe 版本:4.7.3

总结: 在 WAMP (Win10) 上通过终端 (gitbash) 安装主题时,我经常在公开 Web 目录步骤中遇到缺少文件夹的错误错误文件夹丢失,因此无法公开。

在下面的示例中,我注意到 composer.json 文件要求公开 5 个文件夹,但实际安装过程只创建了其中的 4 个文件夹。

"expose": [
            "css","javascript","images","icons","fonts"

由于安装没有创建'images'文件夹,当暴露任务没有找到这个文件夹时,它会停止任务并且列表中'images'下面的文件夹(图标、字体)不会暴露。

问题:解决此问题的最佳方法是什么?

  • 我的直接想法是制作存储库的副本,将 composer.json 更改为 not 公开“图像”并安装它。但一定有更简单的方法解决它吗?
  • 我还尝试 (1) 手动创建丢失的(图像)折叠,(2) 删除 public/ 文件夹和 (3) 运行“Composer update”或“Composer vendor-expose”的变体,以尝试再次公开所有内容,但它确实再次公开了所有内容主题文件夹除外。

感谢任何可以提供帮助的人。 在这种情况下,我只想知道正确、正确的方法

Package operations: 1 install,0 updates,0 removals
  - Syncing theme/silverstripe-theme (dev-master xxxxxx) into cache
  - Installing theme/silverstripe-theme (dev-master xxxxxxx): cloning xxxxxxxx from cache
Exposing web directories for silverstripe-theme name/silverstripe-theme with method auto:
  - css
  - javascript
  - images
  - icons
  - fonts
 
[ErrorException]
  copy(C:\wamp64\www\project-name\themes\theme-name\images): Failed to open stream: No such file or directory

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)