This is a fork of the ckeditor-dev repository.
To build a production-ready build, use:
./build-ckeditor.sh $CKEDITOR_VERSION
Where $CKEDTIOR_VERSION
is a valid tag in the CKEDITOR repository, such as "4.11.3".
If you'd rather like a development build, for example for local debugging, use:
env DEBUG=1 ./build-ckeditor.sh $CKEDITOR_VERSION
The build files will be generated in the ckeditor
directory.
WARNING: You should never publish development builds to the npm registry.
Testing in liferay-portal
To test your local CKEditor build in liferay-portal:
- Navigate to the frontend-editor-ckeditor-web module
- Run
yarn add $PATH_TO_LOCAL_LIFERAY_CKEDITOR_REPO
- Re-deploy the module with
gradlew clean deploy
.
After successfully building and testing you can publish to NPM.
# Confirm that worktree is clean and up-to-date.
git checkout master
git pull upstream master --ff-only
git status
# Bump the version number, creating a commit and tag.
# See below for notes on the format of the version number.
npm version $VERSION
# Sanity check what will be published.
npm publish --dry-run
# Publish to GitHub.
git push upstream master --follow-tags
# Publish to NPM.
npm publish
For tagging and publishing $VERSION
should be of the form $CKEDITOR_VERSION-liferay.$RELEASE
. For example, "4.11.3-liferay.1"; that is:
- Based on CKEditor 4.11.3.
- Release number 1.
Subsequent releases would be "4.11.3-liferay.2", "4.11.3-liferay.3" and so on. When we update to CKEditor 4.11.4, we reset the suffix, so the release would be "4.11.4-liferay.1", "4.11.4-liferay.2" and so on.
WARNING: You should never publish development builds to the npm registry.
Updating CKEditor in liferay-portal
To update CKEditor in liferay-portal:
- Navigate to the frontend-editor-ckeditor-web module
- Update the
liferay-ckeditor
dependency in thepackage.json
file - Re-deploy the module with
gradlew clean deploy
.
An example of this can be seen in this commit (look at the package.json
file)
-
Make sure you're update to date with the superproject repository:
git pull origin master
-
Set up everything to start working on a patch:
sh ck.sh setup
-
Work on your changes:
cd
into theckeditor-dev/
submodule and prepare your desired changes on theliferay
branch.This could be
cherry-pick
ing a previously created commit or manually editing a file, so this can't be automated. -
Create your commit, add your changes and write a good commit message.
-
Navigate back to the superproject's root directory and create the patch:
cd .. sh ck.sh patch
-
Create a build of CKEditor containing the patches:
From the root of the superproject's directory, run
sh ck.sh build
-
Don't forget to add the changes and commit