@ckeditor/ckeditor5-dev-utils
- Version 54.2.3
- Published
- 66.9 kB
- 26 dependencies
- GPL-2.0-or-later license
Install
npm i @ckeditor/ckeditor5-dev-utilsyarn add @ckeditor/ckeditor5-dev-utilspnpm add @ckeditor/ckeditor5-dev-utilsOverview
Utils for CKEditor 5 development tools packages.
Index
Functions
Namespaces
Functions
function logger
logger: (moduleVerbosity?: Verbosity) => Logger;Logger module which allows configuring the verbosity level.
There are three levels of verbosity: 1.
info- all messages will be logged, 2.warning- warning and errors will be logged, 3.error- only errors will be logged.Usage:
import { logger } from '@ckeditor/ckeditor5-dev-utils';
const infoLog = logger( 'info' ); infoLog.info( 'Message.' ); // This message will be always displayed. infoLog.warning( 'Message.' ); // This message will be always displayed. infoLog.error( 'Message.' ); // This message will be always displayed.
const warningLog = logger( 'warning' ); warningLog.info( 'Message.' ); // This message won't be displayed. warningLog.warning( 'Message.' ); // This message will be always displayed. warningLog.error( 'Message.' ); // This message will be always displayed.
const errorLog = logger( 'error' ); errorLog.info( 'Message.' ); // This message won't be displayed. errorLog.warning( 'Message.' ); // This message won't be displayed. errorLog.error( 'Message.' ); // This message will be always displayed.
Additionally, the
logger#error()method prints the error instance if provided as the second argument.
Namespaces
namespace builds
module 'dist/builds/index.d.ts' {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function getDllPluginWebpackConfig
getDllPluginWebpackConfig: ( webpack: WebpackOptions, options: GetDllPluginWebpackConfigOptions) => Promise<DllWebpackConfig>;Returns a webpack configuration that creates a bundle file for the specified package. Thanks to that, plugins exported by the package can be added to DLL builds.
Returns
{object}
namespace bundler
module 'dist/bundler/index.d.ts' {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function getLicenseBanner
getLicenseBanner: () => string;Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
namespace loaders
module 'dist/loaders/index.d.ts' {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function getCoverageLoader
getCoverageLoader: ({ files,}: { files: Array<Array<string>>;}) => CoverageLoaderConfig;function getDebugLoader
getDebugLoader: (debugFlags: Array<string>) => DebugLoaderOptions;Parameter debugFlags
Returns
{object}
function getFormattedTextLoader
getFormattedTextLoader: () => { test: RegExp; use: Array<string> };Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function getIconsLoader
getIconsLoader: ({ matchExtensionOnly }?: { matchExtensionOnly?: boolean }) => { test: RegExp; use: Array<string>;};Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function getJavaScriptLoader
getJavaScriptLoader: ({ debugFlags,}: { debugFlags: Array<string>;}) => JavaScriptLoaderOptions;function getStylesLoader
getStylesLoader: (options: GetStylesLoaderOptions) => StylesLoader;function getTypeScriptLoader
getTypeScriptLoader: (options?: TypeScriptLoaderOptions) => TypeScriptLoader;namespace npm
module 'dist/npm/index.d.ts' {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function checkVersionAvailability
checkVersionAvailability: ( version: string, packageName: string) => Promise<boolean>;Checks if a specific version of a package is available in the npm registry.
function manifest
manifest: ( spec: string, opts?: pacote.Options | undefined) => Promise<pacote.AbbreviatedManifest & pacote.ManifestResult>;function packument
packument: ( spec: string, opts?: pacote.Options | undefined) => Promise< { versions: Record<string, pacote.AbbreviatedManifest> } & Pick< pacote.Packument, 'name' | 'dist-tags' > & pacote.PackumentResult>;namespace stream
module 'dist/stream/index.d.ts' {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function noop
noop: (callback?: (chunk: unknown) => unknown | Promise<unknown>) => Transform;namespace styles
module 'dist/styles/index.d.ts' {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function getPostCssConfig
getPostCssConfig: (options?: GetPostCssConfigOptions) => PostCssConfig;Returns a PostCSS configuration to build the editor styles (e.g., used by postcss-loader).
function themeImporter
themeImporter: typeof themeImporter;A PostCSS plugin that loads a theme files from specified path.
For any CSS file processed by the PostCSS, this plugin tries to find a complementary theme file and load it (knowing the path to the theme). Theme files must be organized to reflect the structure of the CSS files in editor packages,
E.g., if the path to the theme is:
/foo/bar/ckeditor5-theme-foo/theme/theme.cssand the CSS to be themed is:
/baz/qux/ckeditor5-qux/theme/components/button.cssthe theme file for
button.cssshould be located under:/foo/bar/ckeditor5-theme-foo/ckeditor5-qux/theme/components/button.cssSee the
ThemeImporterOptionsto learn about importer options.To learn more about PostCSS plugins, please refer to the API [documentation](http://api.postcss.org/postcss.html#.plugin) of the project.
namespace styles.themeImporter
namespace styles.themeImporter {}variable postcss
var postcss: boolean;namespace tools
module 'dist/tools/index.d.ts' {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function commit
commit: ({ cwd, message, files, dryRun,}: { cwd: string; message: string; files: Array<string>; dryRun?: boolean;}) => Promise<void>;Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function createSpinner
createSpinner: ( title: string, options?: CreateSpinnerOptions) => CKEditor5Spinner;A factory function that creates an instance of a CLI spinner. It supports both a spinner CLI and a spinner with a counter.
The spinner improves UX when processing a time-consuming task. A developer does not have to consider whether the process hanged on.
Parameter title
Description of the current processed task.
Parameter options
function getDirectories
getDirectories: (directoryPath: string) => Array<string>;Returns array with all directories under the specified path.
function shExec
shExec: { (command: string, options: { async: true } & ShExecOptions): Promise<string>; (command: string, options?: { async?: false } & ShExecOptions): string;};function updateJSONFile
updateJSONFile: ( filePath: string, updateFunction: (json: object) => object) => void;Updates JSON file under a specified path.
Parameter filePath
Path to a file on disk.
Parameter updateFunction
Function that will be called with a parsed JSON object. It should return the modified JSON object to save.
namespace workspaces
module 'dist/workspaces/index.d.ts' {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
function findPathsToPackages
findPathsToPackages: ( cwd: string, packagesDirectory: string | null, options?: Options) => Promise<Array<string>>;This function locates package.json files for all packages located in
packagesDirectoryin the repository structure.
function getPackageJson
getPackageJson: { (cwd: string, options: { async: true }): Promise<PackageJson>; (cwd: string, options?: { async?: false }): PackageJson;};function getRepositoryUrl
getRepositoryUrl: { (cwd: string, options: { async: true }): Promise<string>; (cwd: string, options?: { async?: false }): string;};Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
interface PackageJson
interface PackageJson {}Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md.
property author
author?: | string | { name: string; email?: string; url?: string; };property bin
bin?: { [commandName: string]: string;};property bugs
bugs?: | string | { url: string; email?: string; };property dependencies
dependencies?: { [packageName: string]: string;};property description
description?: string;property devDependencies
devDependencies?: { [packageName: string]: string;};property engines
engines?: { [engineName: string]: string;};property files
files?: Array<string>;property homepage
homepage?: string;property keywords
keywords?: Array<string>;property license
license?: string;property main
main?: string;property name
name: string;property optionalDependencies
optionalDependencies?: { [packageName: string]: string;};property peerDependencies
peerDependencies?: { [packageName: string]: string;};property private
private?: boolean;property repository
repository?: | string | { type: string; url: string; directory?: string; };property scripts
scripts?: { [key: string]: string;};property type
type?: 'commonjs' | 'module';property types
types?: string;property version
version: string;index signature
[key: string]: any;Package Files (32)
- dist/builds/getdllpluginwebpackconfig.d.ts
- dist/builds/index.d.ts
- dist/bundler/getlicensebanner.d.ts
- dist/bundler/index.d.ts
- dist/index.d.ts
- dist/loaders/getcoverageloader.d.ts
- dist/loaders/getdebugloader.d.ts
- dist/loaders/getformattedtextloader.d.ts
- dist/loaders/geticonsloader.d.ts
- dist/loaders/getjavascriptloader.d.ts
- dist/loaders/getstylesloader.d.ts
- dist/loaders/gettypescriptloader.d.ts
- dist/loaders/index.d.ts
- dist/logger/index.d.ts
- dist/npm/checkversionavailability.d.ts
- dist/npm/index.d.ts
- dist/npm/pacotecacheless.d.ts
- dist/stream/index.d.ts
- dist/stream/noop.d.ts
- dist/styles/getpostcssconfig.d.ts
- dist/styles/index.d.ts
- dist/styles/themeimporter.d.ts
- dist/tools/commit.d.ts
- dist/tools/createspinner.d.ts
- dist/tools/getdirectories.d.ts
- dist/tools/index.d.ts
- dist/tools/shexec.d.ts
- dist/tools/updatejsonfile.d.ts
- dist/workspaces/findpathstopackages.d.ts
- dist/workspaces/getpackagejson.d.ts
- dist/workspaces/getrepositoryurl.d.ts
- dist/workspaces/index.d.ts
Dependencies (26)
- @ckeditor/ckeditor5-dev-translations
- @types/postcss-import
- @types/through2
- babel-loader
- cli-cursor
- cli-spinners
- css-loader
- cssnano
- esbuild-loader
- glob
- is-interactive
- mini-css-extract-plugin
- mocha
- pacote
- postcss
- postcss-import
- postcss-loader
- postcss-mixins
- postcss-nesting
- raw-loader
- shelljs
- simple-git
- style-loader
- terser-webpack-plugin
- through2
- upath
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ckeditor/ckeditor5-dev-utils.
- Markdown[](https://www.jsdocs.io/package/@ckeditor/ckeditor5-dev-utils)
- HTML<a href="https://www.jsdocs.io/package/@ckeditor/ckeditor5-dev-utils"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 4435 ms. - Missing or incorrect documentation? Open an issue for this package.
