Composer 供应商公开副本没有为我的 silverstrip 模块选择正确的名称
Composer vendor expose copy not picking up the correct name for my silverstrip module
我正在为 silverstripe 创建一个模块,我想公开我的资产以便我可以使用图像、css 和 js。
silverstripe 模块的作者
{
"name": "poptin/silverstripe",
"description": "A skeleton for SilverStripe modules.",
"type": "silverstripe-vendormodule",
"keywords": [
"silverstripe",
"CMS"
],
"license": "BSD-3-Clause",
"require": {
"silverstripe/framework": "^4.0",
"silverstripe/admin": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0"
},
"autoload": {
"psr-4": {
"Poptin\SilverStripe\": "src/",
"Poptin\SilverStripe\Tests\": "tests/"
}
},
"extra": {
"expose": [
"client/dist"
]
},
"minimum-stability": "dev",
"prefer-stable": true
}
silverstripe 的作曲者
{
"name": "silverstripe/installer",
"type": "silverstripe-recipe",
"description": "The SilverStripe Framework Installer",
"require": {
"php": ">=7.1.0",
"silverstripe/recipe-plugin": "^1.2",
"silverstripe/recipe-cms": "4.5.2@stable",
"silverstripe-themes/simple": "~3.2.0",
"poptin/silverstripe": "dev-master",
"dnadesign/silverstripe-elemental": "^4",
"silverstripe/blog": "^3.5"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"extra": {
"resources-dir": "_resources",
"project-files-installed": [
"app/.htaccess",
"app/_config.php",
"app/_config/mysite.yml",
"app/src/Page.php",
"app/src/PageController.php"
],
"public-files-installed": [
".htaccess",
"index.php",
"web.config"
]
},
"repositories": [
{
"type": "path",
"url": "../silverstripe-module"
}
],
"config": {
"process-timeout": 600
},
"prefer-stable": true,
"minimum-stability": "dev"
}
但是当我 composer vendor-expose symlink
时,我最终得到一个 _resource
文件夹,如下所示:
文件出现在 -module 文件夹中,而不是出现在 vendor 文件夹中。我不确定我做错了什么。
编辑:我什至尝试将存储库类型更改为 vcs
"repositories": [
{
"type": "vcs",
"url": "../silverstripe-module"
}
],
仍然没有运气
我错误地 运行 composer install
在模块文件夹中,它在模块本身中安装了 SS 的依赖项,并且在 vendor:publish
.
时发生冲突
自言自语:从不 运行 composer install
在 composer 模块中,而是从需要模块的主项目的根目录。
我正在为 silverstripe 创建一个模块,我想公开我的资产以便我可以使用图像、css 和 js。
silverstripe 模块的作者
{
"name": "poptin/silverstripe",
"description": "A skeleton for SilverStripe modules.",
"type": "silverstripe-vendormodule",
"keywords": [
"silverstripe",
"CMS"
],
"license": "BSD-3-Clause",
"require": {
"silverstripe/framework": "^4.0",
"silverstripe/admin": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0"
},
"autoload": {
"psr-4": {
"Poptin\SilverStripe\": "src/",
"Poptin\SilverStripe\Tests\": "tests/"
}
},
"extra": {
"expose": [
"client/dist"
]
},
"minimum-stability": "dev",
"prefer-stable": true
}
silverstripe 的作曲者
{
"name": "silverstripe/installer",
"type": "silverstripe-recipe",
"description": "The SilverStripe Framework Installer",
"require": {
"php": ">=7.1.0",
"silverstripe/recipe-plugin": "^1.2",
"silverstripe/recipe-cms": "4.5.2@stable",
"silverstripe-themes/simple": "~3.2.0",
"poptin/silverstripe": "dev-master",
"dnadesign/silverstripe-elemental": "^4",
"silverstripe/blog": "^3.5"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"extra": {
"resources-dir": "_resources",
"project-files-installed": [
"app/.htaccess",
"app/_config.php",
"app/_config/mysite.yml",
"app/src/Page.php",
"app/src/PageController.php"
],
"public-files-installed": [
".htaccess",
"index.php",
"web.config"
]
},
"repositories": [
{
"type": "path",
"url": "../silverstripe-module"
}
],
"config": {
"process-timeout": 600
},
"prefer-stable": true,
"minimum-stability": "dev"
}
但是当我 composer vendor-expose symlink
时,我最终得到一个 _resource
文件夹,如下所示:
文件出现在 -module 文件夹中,而不是出现在 vendor 文件夹中。我不确定我做错了什么。
编辑:我什至尝试将存储库类型更改为 vcs
"repositories": [
{
"type": "vcs",
"url": "../silverstripe-module"
}
],
仍然没有运气
我错误地 运行 composer install
在模块文件夹中,它在模块本身中安装了 SS 的依赖项,并且在 vendor:publish
.
自言自语:从不 运行 composer install
在 composer 模块中,而是从需要模块的主项目的根目录。