【发布时间】:2015-06-10 00:41:07
【问题描述】:
我在为 Yii2 应用程序配置供应商路径时遇到问题。我在从 Yii2 基本应用程序模板获得的 composer.json 文件中添加了几行。我要做的就是更改我的供应商资产的位置。
以下是我对文件所做的更改,但出现此错误:
The file or directory to be published does not exist: /path/to/app/vendor/bower/jquery/dist
但我希望将特定资产发布到:
/path/to/vendors/bower/jquery/dist
无论我做什么,我仍然会收到该错误消息。我怀疑这是 Yii2 问题而不是作曲家问题,但我不确定。有人有什么想法吗?提前致谢。
文件...
index.php
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require('/path/to/vendors/autoload.php');
require('/path/to/vendors/yiisoft/yii2/Yii.php');
$config = require(__DIR__ . '/../config/web.php');
(new yii\web\Application($config))->run();
composer.json
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Project Template",
"keywords": ["yii2", "framework", "basic", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
...
},
"minimum-stability": "dev",
"config": {
"process-timeout": 1800,
"vendor-dir": "/path/to/vendors"
},
"require": {
"fxp/composer-asset-plugin": "~1.0",
...
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "../../includes/vendors/npm",
"bower-asset-library": "../../includes/vendors/bower"
}
}
}
【问题讨论】:
标签: php composer-php yii2 bower