@@ -15,11 +15,7 @@ before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- - npm install
- - npm install @ckeditor/ckeditor5-dev-tests
- - npm install codeclimate-test-reporter
+ - npm install gulp mgit2 lerna @ckeditor/ckeditor5-dev-tests @ckeditor/ckeditor5-dev-lint
+ - ckeditor5-dev-tests-install-dependencies
script:
- node_modules/.bin/ckeditor5-dev-tests-travis
-after_success:
- - node_modules/.bin/codeclimate-test-reporter < build/.automated-tests/coverage/lcov.info
-
@@ -1,5 +1,5 @@
{
- "name": "ckeditor5-utils",
+ "name": "@ckeditor/ckeditor5-utils",
"version": "0.6.0",
"description": "CKEditor 5 Utils",
"keywords": [
@@ -7,7 +7,8 @@
],
"devDependencies": {
"@ckeditor/ckeditor5-dev-lint": "^2.0.0",
- "ckeditor5-core": "ckeditor/ckeditor5-core",
+ "@ckeditor/ckeditor5-core": "*",
+ "@ckeditor/ckeditor5-engine": "*",
"del": "^2.2.0",
"gulp": "^3.9.0",
"guppy-pre-commit": "^0.4.0",
@@ -7,8 +7,8 @@
* @module utils/keystrokehandler
*/
-import DomEmitterMixin from 'ckeditor5-utils/src/dom/emittermixin';
-import { getCode, parseKeystroke } from 'ckeditor5-utils/src/keyboard';
+import DomEmitterMixin from './dom/emittermixin';
+import { getCode, parseKeystroke } from './keyboard';
/**
* Keystroke handler registers keystrokes so the callbacks associated
@@ -3,7 +3,7 @@
* For licensing, see LICENSE.md.
-import normalizeHtml from 'ckeditor5-utils/tests/_utils/normalizehtml';
+import normalizeHtml from '../../tests/_utils/normalizehtml';
describe( 'utils', () => {
describe( 'normalizeHtml', () => {
@@ -3,10 +3,10 @@
-import testUtils from 'ckeditor5-core/tests/_utils/utils';
-import utilsTestUtils from 'ckeditor5-utils/tests/_utils/utils';
-import ObesrvableMixin from 'ckeditor5-utils/src/observablemixin';
-import EmitterMixin from 'ckeditor5-utils/src/emittermixin';
+import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
+import utilsTestUtils from '../../tests/_utils/utils';
+import ObesrvableMixin from '../../src/observablemixin';
+import EmitterMixin from '../../src/emittermixin';
testUtils.createSinonSandbox();
@@ -3,8 +3,8 @@
-import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
-import { stringify } from 'ckeditor5-engine/src/dev-utils/view';
+import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor';
+import { stringify } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';
* Parses given string of HTML and returns normalized HTML.
@@ -5,7 +5,7 @@
/* global console:false */
const utils = {
-import CKEditorError from 'ckeditor5-utils/src/ckeditorerror';
+import CKEditorError from '../src/ckeditorerror';
describe( 'CKEditorError', () => {
it( 'inherits from Error', () => {
@@ -3,9 +3,9 @@
-import Collection from 'ckeditor5-utils/src/collection';
+import Collection from '../src/collection';
-import compareArrays from 'ckeditor5-utils/src/comparearrays';
+import compareArrays from '../src/comparearrays';
describe( 'compareArrays', () => {
-import Config from 'ckeditor5-utils/src/config';
+import Config from '../src/config';
describe( 'Config', () => {
let config;
-import count from 'ckeditor5-utils/src/count';
+import count from '../src/count';
describe( 'count', () => {
-import diff from 'ckeditor5-utils/src/diff';
+import diff from '../src/diff';
describe( 'diff', () => {
it( 'should diff strings', () => {
-import diffToChanges from 'ckeditor5-utils/src/difftochanges';
+import diffToChanges from '../src/difftochanges';
describe( 'diffToChanges', () => {
describe( 'equal patterns', () => {
/* globals document */
-import createElement from 'ckeditor5-utils/src/dom/createelement';
+import createElement from '../../src/dom/createelement';
describe( 'createElement', () => {
it( 'should create element', () => {
@@ -5,9 +5,9 @@
/* globals document, window, Event, MouseEvent */
+import DomEmitterMixin from '../../src/dom/emittermixin';
@@ -5,8 +5,8 @@
-import getAncestors from 'ckeditor5-utils/src/dom/getancestors';
+import getAncestors from '../../src/dom/getancestors';
describe( 'getAncestors', () => {
it( 'should return all parents of given node and the node itself, starting from top-most parent', () => {
-import getCommonAncestor from 'ckeditor5-utils/src/dom/getcommonancestor';
+import getCommonAncestor from '../../src/dom/getcommonancestor';
describe( 'getParents', () => {
let b, span1, span2, p1, p2, i, div;
-import getDataFromElement from 'ckeditor5-utils/src/dom/getdatafromelement';
+import getDataFromElement from '../../src/dom/getdatafromelement';
describe( 'getDataFromElement', () => {
let divEl;
/* global document */
-import getPositionedAncestor from 'ckeditor5-utils/src/dom/getpositionedancestor';
+import getPositionedAncestor from '../../src/dom/getpositionedancestor';
describe( 'getPositionedAncestor', () => {
let element;
/* global window, document */
-import global from 'ckeditor5-utils/src/dom/global';
+import global from '../../src/dom/global';
-import indexOf from 'ckeditor5-utils/src/dom/indexof';
+import indexOf from '../../src/dom/indexof';
describe( 'indexOf', () => {
it( 'should return 0 if element has no parent', () => {
-import insertAt from 'ckeditor5-utils/src/dom/insertat';
+import insertAt from '../../src/dom/insertat';
describe( 'insertAt', () => {
it( 'should insert at given position', () => {
/* global Range */
-import isRange from 'ckeditor5-utils/src/dom/isrange';
+import isRange from '../../src/dom/isrange';
describe( 'isRange()', () => {
it( 'detects native DOM Range', () => {
/* global document, window */
-import { getOptimalPosition } from 'ckeditor5-utils/src/dom/position';
+import { getOptimalPosition } from '../../src/dom/position';
-import Rect from 'ckeditor5-utils/src/dom/rect';
+import Rect from '../../src/dom/rect';
-import remove from 'ckeditor5-utils/src/dom/remove';
+import remove from '../../src/dom/remove';
describe( 'remove', () => {
it( 'should remove element form parent', () => {
-import setDataInElement from 'ckeditor5-utils/src/dom/setdatainelement';
+import setDataInElement from '../../src/dom/setdatainelement';
describe( 'setDataInElement', () => {
[ 'textarea', 'template', 'div' ].forEach( ( elementName ) => {
-import toUnit from 'ckeditor5-utils/src/dom/tounit';
+import toUnit from '../../src/dom/tounit';
describe( 'toUnit', () => {
it( 'should be a function', () => {
-import ElementReplacer from 'ckeditor5-utils/src/elementreplacer';
+import ElementReplacer from '../src/elementreplacer';
describe( 'ElementReplacer', () => {
let replacer;
-import { _getEmitterListenedTo, _getEmitterId, _setEmitterId } from 'ckeditor5-utils/src/emittermixin';
-import EventInfo from 'ckeditor5-utils/src/eventinfo';
+import EmitterMixin from '../src/emittermixin';
+import { _getEmitterListenedTo, _getEmitterId, _setEmitterId } from '../src/emittermixin';
+import EventInfo from '../src/eventinfo';
describe( 'EmitterMixin', () => {
let emitter, listener;
-import env, { isMac } from 'ckeditor5-utils/src/env';
+import env, { isMac } from '../src/env';
describe( 'Env', () => {
beforeEach( () => {
describe( 'EventInfo', () => {
it( 'should be created properly', () => {
/* global document, Event */
-import FocusTracker from 'ckeditor5-utils/src/focustracker';
+import FocusTracker from '../src/focustracker';
-import isIterable from 'ckeditor5-utils/src/isiterable';
+import isIterable from '../src/isiterable';
describe( 'isIterable', () => {
-import env from 'ckeditor5-utils/src/env';
-import { keyCodes, getCode, parseKeystroke, getEnvKeystrokeText } from 'ckeditor5-utils/src/keyboard';
+import env from '../src/env';
+import { keyCodes, getCode, parseKeystroke, getEnvKeystrokeText } from '../src/keyboard';
describe( 'Keyboard', () => {
describe( 'keyCodes', () => {
-import KeystrokeHandler from 'ckeditor5-utils/src/keystrokehandler';
-import { keyCodes } from 'ckeditor5-utils/src/keyboard';
+import KeystrokeHandler from '../src/keystrokehandler';
+import { keyCodes } from '../src/keyboard';
describe( 'KeystrokeHandler', () => {
let emitter, keystrokes;
-import Locale from 'ckeditor5-utils/src/locale';
+import Locale from '../src/locale';
describe( 'Locale', () => {
let locale;
-import extend from 'ckeditor5-utils/src/lib/lodash/extend';
+import extend from '../src/lib/lodash/extend';
describe( 'extend()', () => {
/* globals console */
-import log from 'ckeditor5-utils/src/log';
+import log from '../src/log';
describe( 'log', () => {
let spy;
+import FocusTracker from '../../src/focustracker';
const focusTracker = new FocusTracker();
const counters = document.querySelectorAll( '.status b' );
-import mapsEqual from 'ckeditor5-utils/src/mapsequal';
+import mapsEqual from '../src/mapsequal';
describe( 'mapsEqual', () => {
-import mix from 'ckeditor5-utils/src/mix';
+import mix from '../src/mix';
describe( 'mix', () => {
-import nth from 'ckeditor5-utils/src/nth';
+import nth from '../src/nth';
describe( 'nth', () => {
@@ -3,13 +3,13 @@
-import ObservableMixin from 'ckeditor5-utils/src/observablemixin';
+import utilsTestUtils from '../tests/_utils/utils';
+import ObservableMixin from '../src/observablemixin';
const assertBinding = utilsTestUtils.assertBinding;
-import priorities from 'ckeditor5-utils/src/priorities';
+import priorities from '../src/priorities';
describe( 'get', () => {
it( 'should return correct value for string priority', () => {
-import spy from 'ckeditor5-utils/src/spy';
+import spy from '../src/spy';
describe( 'spy', () => {
-import toMap from 'ckeditor5-utils/src/tomap';
+import toMap from '../src/tomap';
describe( 'toMap', () => {
-import uid from 'ckeditor5-utils/src/uid';
+import uid from '../src/uid';
describe( 'uid', () => {
@@ -9,7 +9,7 @@ import {
isCombiningMark,
isInsideSurrogatePair,
isInsideCombinedSymbol
-} from 'ckeditor5-utils/src/unicode';
+} from '../src/unicode';
describe( 'unicode', () => {