user2404501
user2404501

Reputation:

CKBuilder gives me too many plugins

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:

  1. Clone the git repository
  2. git checkout 4.3.3 (this is the version on the production server)
  3. 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)
  4. cd dev/builder ; ./build.sh
  5. 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
  6. tried ./build.sh again

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.

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.

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!

Can anyone explain why the build.sh can't give me anything close to the version I downloaded from the online builder?

(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!)

Upvotes: 2

Views: 971

Answers (1)

Reinmar
Reinmar

Reputation: 22023

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.

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.

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

As you'll find there it is possible to change the version, leave JS and CSS unminified etc.

PS. Sorry for the spam filter on forum.

Upvotes: 3

Related Questions