This repository follows the mono-repository structure. It contains multiple npm packages.
Name | Version | Description |
---|---|---|
create-ckeditor5-plugin
|
The tool for creating CKEditor 5 packages. | |
@ckeditor/ckeditor5-package-tools
|
Development environment tools for CKEditor 5 packages. |
- Clone the repository:
git clone [email protected]:ckeditor/create-ckeditor5-plugin.git
- Install required dependencies:
yarn install
To create a new plugin, call the create-ckeditor5-plugin
executable file. It requires a single argument which is the package name. It must follow the schema: @organization/ckeditor5-package
, where @organization
is a scope of the package, and ckeditor5-package
is the package name. It must start with the ckeditor5-
prefix.
The tool will create a new directory called @organization/ckeditor5-package
with an initial plugin and tools for developing it inside.
To use a local version of the @ckeditor/ckeditor5-package-tools
package, use the --dev
option when executing the command.
node /path/to/repository/packages/create-ckeditor5-plugin <directory> [--dev]
--verbose
- (alias:-v
) whether to prints additional logs.--dev
- whether to execute in the development mode. It means that the@ckeditor/ckeditor5-package-tools
will not be installed from npm, but from the local file system.
Available scripts and their modifiers are described in the README.md
file of the create-ckeditor5-plugin
package.
When creating a new package with the --dev
option, the local version of the @ckeditor/ckeditor5-package-tools
will be installed instead of its npm version.
However, applying changes in the local repository does not impact an already created package. Hence, you need to create a link between the local repository and the new package.
# The assumption here is your current working directory points to the root directory in the repository.
cd packages/ckeditor5-package-tools
yarn link
# Then, go to the newly created package.
cd /path/to/new/package/ckeditor5-foo
yarn link @ckeditor/ckeditor5-package-tools
Now, the newly created package uses changes from the local repository.
- Fetch all changes and switch to the
##master
branch. - Execute
npm run changelog
:
- Scan the logs printed by the tool – search for errors (incorrect changelog entries). Incorrect entries (e.g., ones without the type) are being ignored. You may need to create entries for them manually. This is done directly in
CHANGELOG.md
(in the root directory). Make sure to verify the proposed version after you modify the changelog. - When unsure what has changed in this version of a specific package, use
git diff <hash of the previous release> packages/<name>/
.
After generating the changelog, you are ready for publishing packages.
First, you need to bump their versions:
npm run release:bump-version
You can also use the --dry-run
option to see what this task does.
After bumping versions, you can publish changes:
npm run release:publish
As in the previous task, the --dry-run
option is also available.
The create-ckeditor5-plugin
tool is available under the MIT license.
All packages created with the tool are also available under the MIT license.