Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Bower安装CKeditor_Ckeditor_Package Managers_Bower - Fatal编程技术网

使用Bower安装CKeditor

使用Bower安装CKeditor,ckeditor,package-managers,bower,Ckeditor,Package Managers,Bower,我正在努力用Bower安装ckeditor,我尝试了很多不同的方法,但每次我都只得到一个.Bower.json文件和一个自述文件或索引文件。我从来没有得到超过2个文件:(我可以安装其他软件包刚刚好,所以我知道一切都设置好了 以下是我尝试过的一些事情: { "dependencies": { "ckeditor": "latest", "ckeditor": "https://github.com/ckeditor/ckeditor-

我正在努力用Bower安装ckeditor,我尝试了很多不同的方法,但每次我都只得到一个
.Bower.json
文件和一个
自述文件或
索引
文件。我从来没有得到超过2个文件:(我可以安装其他软件包刚刚好,所以我知道一切都设置好了

以下是我尝试过的一些事情:

    {
       "dependencies": {
          "ckeditor": "latest",

          "ckeditor": "https://github.com/ckeditor/ckeditor-releases/releases/tag/4.2.1/standard",

          "ckeditor": "https://github.com/ckeditor/ckeditor-releases/releases/tag/4.2.1/standard",

          "ckeditor": "https://github.com/ckeditor/ckeditor-releases/commit/a822d585d4ebf8d969fa" 
       }
    }

为什么这个包与其他包不同?破解它的关键是什么?

它没有任何有效的git标记版本,因此Bower尝试获取只包含自述文件的分支。请改用
Bower install ckeditor#stable/standard

现在,如果您只使用:

'ckeditor: "*"'
在您的bower.json中。但是,这将只提取标准版本。有关此问题的更多信息,请参阅:


自版本4.3.3以来,CKEditor引入了对Bower的支持。您只需使用以下命令安装即可:

bower install ckeditor
您也可以通过在
bower.json
中设置依赖项来下载它:

{
    "name": "my-project",
    "dependencies": {
        "ckeditor": "4"
    }
}
之后,使用以下内容获取依赖项:

bower update
注意:它将下载标准的all预置,该预置基本上包含所有可用的官方插件,但仅在配置中启用了部分插件


更多信息可以在中找到。

有时您需要使用特定版本的ckeditor的特定预设

首先,这里有一个很有帮助的示例,它将简化指定存储库标记所需的语法

下面是bower.json文件中要包含的内容的示例:

{
 name: "your-name",
  "dependencies": {
      "ckeditor": "#full/4.3.3"
  }
}
只需将“完整”替换为基本、标准或您想要的版本

然后运行:

bower update

很酷,这很管用。如果使用bower.json“ckeditor”,看起来是这样的“#稳定/标准”。感谢您告诉我们-我们很快就会切换到semver标记。对于基本编辑器,请将
标准
替换为
基本
,这样它将出现在bower.json:
“ckeditor”:“#稳定/基本”,
帮助其他正在谷歌上搜索完整版本的用户:使用命令行中的
“bower安装ckeditor#stable/full”
“ckeditor”:“bower.json中的”#stable/full“
也可以。