Skip to content

Latest commit

 

History

History

ckeditor5-package-tools

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CKEditor 5 Package Tools

npm version

This package implements the scripts and utils used by ckeditor5-package-generator.

Installation

npm install --save @ckeditor/ckeditor5-package-tools

Usage

The following scripts are available in the package:

  • test – run tests using Vitest testing framework,
  • test:debug – run tests using Vitest testing framework and allows debugging them. Once Vitest starts it will stop execution and wait for you to open developer tools that can connect to Node.js inspector,
  • start – prepares the development server with the live-reloading mechanism,
  • dll:build – prepares a file compatible with CKEditor 5 DLL that exposes plugins from the package,
  • translations:synchronize – validates and synchronizes the translation messages by updating all translation files (*.po files) to be in sync with the context file,
  • translations:validate – only validates the translation messages against the context file,
  • export-package-as-javascript – changes main entry in package.json file to point to a .js file,
  • export-package-as-typescript – changes main entry in package.json file to point to a .ts file.

There are two ways to integrate these scripts, either with npm scripts or Node.js scripts.

Integration with npm scripts

Available scripts can be called via npm scripts in the package.json file, e.g.:

{
  "dll:build": "ckeditor5-package-tools dll:build"
}

Integration with Node.js scripts

Available scripts can be called manually as Node scripts, e.g.:

import packageTools from '@ckeditor/ckeditor5-package-tools';

packageTools[ 'dll:build' ]( /* Ckeditor5PackageToolsOptions */ );

All available scripts require the Ckeditor5PackageToolsOptions object. Its interface is described in the lib/utils/parse-arguments.js file.

Contribute

The source code of this package is available on GitHub in https://github.com/ckeditor/ckeditor5-package-generator/tree/master/packages/ckeditor5-package-tools.

Changelog

See the CHANGELOG.md file.

License

The package is licensed under the terms of MIT license. Please check the LICENSE.md file.