1 | CKEditor 5 development utilities library
|
2 | ========================================
|
3 |
|
4 | [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-dev-utils.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-utils)
|
5 | [![Build Status](https://travis-ci.com/ckeditor/ckeditor5-dev.svg?branch=master)](https://app.travis-ci.com/github/ckeditor/ckeditor5-dev)
|
6 | ![Dependency Status](https://img.shields.io/librariesio/release/npm/@ckeditor/ckeditor5-dev-utils)
|
7 |
|
8 | Utils for [CKEditor 5](https://ckeditor.com) development tools packages.
|
9 |
|
10 | More information about development tools packages can be found at the following URL: <https://github.com/ckeditor/ckeditor5-dev>.
|
11 |
|
12 | ## Available modules
|
13 |
|
14 | Note: Not all modules exported by this package are covered in this documentation.
|
15 |
|
16 | ### Logger
|
17 |
|
18 | Logger functions with configurable verbosity.
|
19 |
|
20 | There are three levels of verbosity:
|
21 |
|
22 | 1. `info` - all messages will be logged,
|
23 | 2. `warning` - warning and errors will be logged,
|
24 | 3. `error` - only errors will be logged.
|
25 |
|
26 | Usage:
|
27 |
|
28 | ```js
|
29 | const logger = require( '@ckeditor/ckeditor5-dev-utils' ).logger;
|
30 |
|
31 | // All messages will be displayed.
|
32 | const infoLog = logger( 'info' );
|
33 | infoLog.info( 'Message.' );
|
34 | infoLog.warning( 'Message.' );
|
35 | infoLog.error( 'Message.' );
|
36 |
|
37 | // This First message won't be displayed..
|
38 | const warningLog = logger( 'warning' );
|
39 | warningLog.info( 'Message.' );
|
40 | warningLog.warning( 'Message.' );
|
41 | warningLog.error( 'Message.' );
|
42 |
|
43 | // Only the last message will be displayed.
|
44 | const errorLog = logger( 'error' );
|
45 | errorLog.info( 'Message.' );
|
46 | errorLog.warning( 'Message.' );
|
47 | errorLog.error( 'Message.' );
|
48 | ```
|
49 |
|
50 | ## Changelog
|
51 |
|
52 | See the [`CHANGELOG.md`](https://github.com/ckeditor/ckeditor5-dev/blob/master/packages/ckeditor5-dev-utils/CHANGELOG.md) file.
|
53 |
|
54 | ## License
|
55 |
|
56 | Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file.
|