CKBuilder给了我太多的插件 [英] CKBuilder gives me too many plugins
问题描述
期望对ckeditor进行一些修改,我正尝试从源代码构建它,如文档此处。我想构建一个尽可能与我已经在生产Web服务器上安装的版本相同的版本,因此以后再部署修改后的版本时,不会感到惊讶。这是我遵循的步骤:
In anticipation of making some modifications to ckeditor, I'm trying to build it from source, as described in the documentation here. I want to build a version that is, as nearly as possible, identical to the version I already have installed on my production web server, so there won't be any surprises when I deploy my modified version later. Here are the steps I've followed:
- 克隆git存储库
-
git checkout 4.3.3
(这是生产服务器上的版本) - 将build-config.js从生产服务器复制到ckeditor-dev / dev / builder /(我的生产版本来自在线生成器;配置位于 http://ckeditor.com/ builder / 059ce76c63ea2ff01636265c46f713c5 )
-
cd dev / builder; ./build.sh
- 有人抱怨缺少插件(scayt和wsc),所以我将它们下载为zip文件(scayt_4.3.3.zip和wsc_4)。 3.3.zip)并解压缩到ckeditor-dev / plugins
- 再次尝试
./ build.sh
- Clone the git repository
git checkout 4.3.3
(this is the version on the production server)- copy the build-config.js from the production server to ckeditor-dev/dev/builder/ (my production version came from the online builder; the config is at http://ckeditor.com/builder/059ce76c63ea2ff01636265c46f713c5)
cd dev/builder ; ./build.sh
- there were complaints about missing plugins (scayt and wsc) so I downloaded them as zip files (scayt_4.3.3.zip and wsc_4.3.3.zip) and unzipped them in ckeditor-dev/plugins
- tried
./build.sh
again
它显然已成功完成,但 release / ckeditor
的结果与生产版本不匹配正如我所希望的。它包含许多我不需要的插件,而且我知道它们不是我需要的插件的依赖项,因为没有它们的生产版本可以正常工作。例如,我有 release / ckeditor / plugins / adobeair
,这在我的 build-config.js
中没有提到。
It apparently completed successfully, but the result in release/ckeditor
is not a match for the production version as I had hoped. It contains a lot of plugins that I didn't ask for, and I know they're not dependencies of plugins I did ask for because the production version works fine without them. For example, I have release/ckeditor/plugins/adobeair
which is not mentioned in my build-config.js
.
主 ckeditor.js
文件与生产版本也不匹配。我可以看到部分原因是时间戳和版本字符串( 4.3.3 DEV)不同,但是还有很多其他变化,由于变化很小,因此我不容易检查。而且我真的不相信此文件的构建正确,因为插件列表的构建不正确。另外,我无法将构建过程分解为更小的步骤,以了解其作用,因为没有来源。
The main ckeditor.js
file is not a match for the production version either. i can see that part of the reason is that there is a different timestamp and version string ("4.3.3 DEV"), but there are lots of other changes too, which I can't easily examine because it's minified. And I can't really trust that this file was built correctly, since the plugin list wasn't built correctly. Also I can't break the build process down into smaller steps find out what it's doing because there's no source.
为了试图了解正在发生的事情,我拼命地采取了行动,我在 build-config.js
到 about
插件并运行 ./ build.sh
再次。这导致 release / ckeditor / plugins
变得更大!
In a desperate move to try to understand what's going on, I reduced the plugin list in build-config.js
to just the about
plugin and ran ./build.sh
again. This caused release/ckeditor/plugins
to get even bigger!
谁能解释为什么 build.sh
不能给我接近我从在线生成器下载的版本的任何内容吗?
Can anyone explain why the build.sh
can't give me anything close to the version I downloaded from the online builder?
(顺便问一下,这个问题在这里而不是在CKEditor支持论坛上,因为他们不允许我将其发布在这里。我叫垃圾邮件发送者!)
(By the way, this question is here instead of on the CKEditor support forum because they wouldn't let me post it there. Called me a spammer!)
推荐答案
CKBuilder,供 https://github.com/ckeditor/ckeditor-dev正是 http://ckeditor.com/builder 使用的那个。差异是由传递给它的不同参数引起的。
CKBuilder which is used by the build script in https://github.com/ckeditor/ckeditor-dev is exactly the one which is used by http://ckeditor.com/builder. The difference is caused by different arguments passed to it.
默认情况下,CKBuilder添加所有插件,即使在 build-config.js中省略的插件
到程序包,尽管它不会将它们合并到 ckeditor.js
中。它们可以按需启用。因此, ckeditor.js
不大于从 http:// ckeditor下载的内容大.com / builder 。
By default CKBuilder adds all plugins, even those omitted in build-config.js
, to the package, although it doesn't merge them into the ckeditor.js
. They are available to be enabled on demand. So ckeditor.js
is not bigger than that downloaded from http://ckeditor.com/builder.
仅使用您在 build-config.js $中指定的那些插件构建软件包c $ c>将
-s
选项传递给构建脚本:
To build a package with only those plugins which you specified in build-config.js
pass -s
option to the build script:
> ./dev/builder/build.sh -s
您还可以检查其他选项:
You can also check other options:
> ./dev/builder/build.sh --help
您会发现有可能要更改版本,请不要缩小JS和CSS等。
As you'll find there it is possible to change the version, leave JS and CSS unminified etc.
PS。抱歉,论坛上的垃圾邮件过滤器。
PS. Sorry for the spam filter on forum.
这篇关于CKBuilder给了我太多的插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!