浏览代码

Use package-based paths to modules.

Piotrek Koszuliński 9 年之前
父节点
当前提交
43ef7d19eb
共有 28 个文件被更改,包括 106 次插入106 次删除
  1. 2 2
      packages/ckeditor5-core/src/command/command.js
  2. 3 3
      packages/ckeditor5-core/src/command/helpers/getschemavalidranges.js
  3. 1 1
      packages/ckeditor5-core/src/command/helpers/isattributeallowedinselection.js
  4. 3 3
      packages/ckeditor5-core/src/command/toggleattributecommand.js
  5. 9 9
      packages/ckeditor5-core/src/editor/editor.js
  6. 5 5
      packages/ckeditor5-core/src/editor/standardeditor.js
  7. 2 2
      packages/ckeditor5-core/src/keystrokehandler.js
  8. 2 2
      packages/ckeditor5-core/src/plugin.js
  9. 3 3
      packages/ckeditor5-core/src/plugincollection.js
  10. 8 8
      packages/ckeditor5-core/tests/_utils-tests/classictesteditor.js
  11. 4 4
      packages/ckeditor5-core/tests/_utils-tests/classictesteditorui.js
  12. 1 1
      packages/ckeditor5-core/tests/_utils-tests/createsinonsandbox.js
  13. 6 6
      packages/ckeditor5-core/tests/_utils-tests/modeltesteditor.js
  14. 5 5
      packages/ckeditor5-core/tests/_utils-tests/virtualtesteditor.js
  15. 4 4
      packages/ckeditor5-core/tests/_utils/classictesteditor.js
  16. 2 2
      packages/ckeditor5-core/tests/_utils/classictesteditorui.js
  17. 2 2
      packages/ckeditor5-core/tests/_utils/modeltesteditor.js
  18. 2 2
      packages/ckeditor5-core/tests/_utils/virtualtesteditor.js
  19. 2 2
      packages/ckeditor5-core/tests/command/command.js
  20. 5 5
      packages/ckeditor5-core/tests/command/helpers/getschemavalidranges.js
  21. 3 3
      packages/ckeditor5-core/tests/command/helpers/isattributeallowedinselection.js
  22. 7 7
      packages/ckeditor5-core/tests/command/toggleattributecommand.js
  23. 4 4
      packages/ckeditor5-core/tests/editor/editor-base.js
  24. 4 4
      packages/ckeditor5-core/tests/editor/editor.js
  25. 6 6
      packages/ckeditor5-core/tests/editor/standardeditor.js
  26. 3 3
      packages/ckeditor5-core/tests/keystrokehandler.js
  27. 2 2
      packages/ckeditor5-core/tests/plugin.js
  28. 6 6
      packages/ckeditor5-core/tests/plugincollection.js

+ 2 - 2
packages/ckeditor5-core/src/command/command.js

@@ -7,8 +7,8 @@
  * @module core/command/command
  */
 
-import ObservableMixin from '../../utils/observablemixin.js';
-import mix from '../../utils/mix.js';
+import ObservableMixin from 'ckeditor5-utils/src/observablemixin';
+import mix from 'ckeditor5-utils/src/mix';
 
 /**
  * The base class for CKEditor commands.

+ 3 - 3
packages/ckeditor5-core/src/command/helpers/getschemavalidranges.js

@@ -7,9 +7,9 @@
  * @module core/command/helpers/getschemavalidranges
  */
 
-import TreeWalker from '../../../engine/model/treewalker.js';
-import Range from '../../../engine/model/range.js';
-import Position from '../../../engine/model/position.js';
+import TreeWalker from 'ckeditor5-engine/src/model/treewalker';
+import Range from 'ckeditor5-engine/src/model/range';
+import Position from 'ckeditor5-engine/src/model/position';
 
 /**
  * Walks through given array of ranges and removes parts of them that are not allowed by passed schema to have the

+ 1 - 1
packages/ckeditor5-core/src/command/helpers/isattributeallowedinselection.js

@@ -7,7 +7,7 @@
  * @module core/command/helpers/isattributeallowedinselection
  */
 
-import TreeWalker from '../../../engine/model/treewalker.js';
+import TreeWalker from 'ckeditor5-engine/src/model/treewalker';
 
 /**
  * Checks {@link module:engine/model/document~Document#schema} if attribute is allowed in selection:

+ 3 - 3
packages/ckeditor5-core/src/command/toggleattributecommand.js

@@ -7,9 +7,9 @@
  * @module core/command/toggleattributecommand
  */
 
-import Command from './command.js';
-import getSchemaValidRanges from './helpers/getschemavalidranges.js';
-import isAttributeAllowedInSelection from './helpers/isattributeallowedinselection.js';
+import Command from './command';
+import getSchemaValidRanges from './helpers/getschemavalidranges';
+import isAttributeAllowedInSelection from './helpers/isattributeallowedinselection';
 
 /**
  * An extension of the base {@link module:core/command/command~Command} class, which provides utilities for a command which toggles a single

+ 9 - 9
packages/ckeditor5-core/src/editor/editor.js

@@ -7,15 +7,15 @@
  * @module core/editor/editor
  */
 
-import EmitterMixin from '../../utils/emittermixin.js';
-import Config from '../../utils/config.js';
-import PluginCollection from '../plugincollection.js';
-import Locale from '../../utils/locale.js';
-import DataController from '../../engine/controller/datacontroller.js';
-import Document from '../../engine/model/document.js';
-
-import CKEditorError from '../../utils/ckeditorerror.js';
-import mix from '../../utils/mix.js';
+import EmitterMixin from 'ckeditor5-utils/src/emittermixin';
+import Config from 'ckeditor5-utils/src/config';
+import PluginCollection from '../plugincollection';
+import Locale from 'ckeditor5-utils/src/locale';
+import DataController from 'ckeditor5-engine/src/controller/datacontroller';
+import Document from 'ckeditor5-engine/src/model/document';
+
+import CKEditorError from 'ckeditor5-utils/src/ckeditorerror';
+import mix from 'ckeditor5-utils/src/mix';
 
 /**
  * Class representing a basic editor. It contains a base architecture, without much additional logic.

+ 5 - 5
packages/ckeditor5-core/src/editor/standardeditor.js

@@ -7,12 +7,12 @@
  * @module core/editor/standardeditor
  */
 
-import Editor from './editor.js';
-import KeystrokeHandler from '../keystrokehandler.js';
-import EditingController from '../../engine/controller/editingcontroller.js';
+import Editor from './editor';
+import KeystrokeHandler from '../keystrokehandler';
+import EditingController from 'ckeditor5-engine/src/controller/editingcontroller';
 
-import getDataFromElement from '../../utils/dom/getdatafromelement.js';
-import setDataInElement from '../../utils/dom/setdatainelement.js';
+import getDataFromElement from 'ckeditor5-utils/src/dom/getdatafromelement';
+import setDataInElement from 'ckeditor5-utils/src/dom/setdatainelement';
 
 /**
  * Class representing a typical browser-based editor. It handles a single source element and

+ 2 - 2
packages/ckeditor5-core/src/keystrokehandler.js

@@ -7,8 +7,8 @@
  * @module core/keystrokehandler
  */
 
-import EmitterMixin from '../utils/emittermixin.js';
-import { getCode, parseKeystroke } from '../utils/keyboard.js';
+import EmitterMixin from 'ckeditor5-utils/src/emittermixin';
+import { getCode, parseKeystroke } from 'ckeditor5-utils/src/keyboard';
 
 /**
  * Keystroke handler. Its instance is available in {@link module:core/editor/standardeditor~StandardEditor#keystrokes} so plugins

+ 2 - 2
packages/ckeditor5-core/src/plugin.js

@@ -7,8 +7,8 @@
  * @module core/plugin
  */
 
-import ObservableMixin from '../utils/observablemixin.js';
-import mix from '../utils/mix.js';
+import ObservableMixin from 'ckeditor5-utils/src/observablemixin';
+import mix from 'ckeditor5-utils/src/mix';
 
 /**
  * The base class for CKEditor plugin classes.

+ 3 - 3
packages/ckeditor5-core/src/plugincollection.js

@@ -7,9 +7,9 @@
  * @module core/plugincollection
  */
 
-import Plugin from './plugin.js';
-import CKEditorError from '../utils/ckeditorerror.js';
-import log from '../utils/log.js';
+import Plugin from './plugin';
+import CKEditorError from 'ckeditor5-utils/src/ckeditorerror';
+import log from 'ckeditor5-utils/src/log';
 
 /**
  * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.

+ 8 - 8
packages/ckeditor5-core/tests/_utils-tests/classictesteditor.js

@@ -5,17 +5,17 @@
 
 /* globals document */
 
-import StandardEditor from 'ckeditor5/core/editor/standardeditor.js';
-import ClassicTestEditor from 'tests/core/_utils/classictesteditor.js';
+import StandardEditor from 'ckeditor5-core/src/editor/standardeditor';
+import ClassicTestEditor from 'ckeditor5-core/tests/_utils/classictesteditor';
 
-import Plugin from 'ckeditor5/core/plugin.js';
-import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
+import Plugin from 'ckeditor5-core/src/plugin';
+import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
 
-import ClassicTestEditorUI from 'tests/core/_utils/classictesteditorui.js';
-import BoxedEditorUIView from 'ckeditor5/ui/editorui/boxed/boxededitoruiview.js';
+import ClassicTestEditorUI from 'ckeditor5-core/tests/_utils/classictesteditorui';
+import BoxedEditorUIView from 'ckeditor5-ui/src/editorui/boxed/boxededitoruiview';
 
-import { getData } from 'ckeditor5/engine/dev-utils/model.js';
-import testUtils from 'tests/core/_utils/utils.js';
+import { getData } from 'ckeditor5-engine/src/dev-utils/model';
+import testUtils from 'ckeditor5-core/tests/_utils/utils';
 
 testUtils.createSinonSandbox();
 

+ 4 - 4
packages/ckeditor5-core/tests/_utils-tests/classictesteditorui.js

@@ -5,10 +5,10 @@
 
 /* bender-tags: editor, browser-only */
 
-import ComponentFactory from 'ckeditor5/ui/componentfactory.js';
-import FocusTracker from 'ckeditor5/utils/focustracker.js';
-import ClassicTestEditorUI from 'tests/core/_utils/classictesteditorui.js';
-import View from 'ckeditor5/ui/view.js';
+import ComponentFactory from 'ckeditor5-ui/src/componentfactory';
+import FocusTracker from 'ckeditor5-utils/src/focustracker';
+import ClassicTestEditorUI from 'ckeditor5-core/tests/_utils/classictesteditorui';
+import View from 'ckeditor5-ui/src/view';
 
 describe( 'ClassicTestEditorUI', () => {
 	let editor, view, ui;

+ 1 - 1
packages/ckeditor5-core/tests/_utils-tests/createsinonsandbox.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-import testUtils from 'tests/core/_utils/utils.js';
+import testUtils from 'ckeditor5-core/tests/_utils/utils';
 
 const obj = {
 	method() {}

+ 6 - 6
packages/ckeditor5-core/tests/_utils-tests/modeltesteditor.js

@@ -3,15 +3,15 @@
  * For licensing, see LICENSE.md.
  */
 
-import Editor from 'ckeditor5/core/editor/editor.js';
-import ModelTestEditor from 'tests/core/_utils/modeltesteditor.js';
+import Editor from 'ckeditor5-core/src/editor/editor';
+import ModelTestEditor from 'ckeditor5-core/tests/_utils/modeltesteditor';
 
-import Plugin from 'ckeditor5/core/plugin.js';
-import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
+import Plugin from 'ckeditor5-core/src/plugin';
+import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
 
-import { getData, setData } from 'ckeditor5/engine/dev-utils/model.js';
+import { getData, setData } from 'ckeditor5-engine/src/dev-utils/model';
 
-import testUtils from 'tests/core/_utils/utils.js';
+import testUtils from 'ckeditor5-core/tests/_utils/utils';
 
 testUtils.createSinonSandbox();
 

+ 5 - 5
packages/ckeditor5-core/tests/_utils-tests/virtualtesteditor.js

@@ -3,13 +3,13 @@
  * For licensing, see LICENSE.md.
  */
 
-import StandardEditor from 'ckeditor5/core/editor/standardeditor.js';
-import VirtualTestEditor from 'tests/core/_utils/virtualtesteditor.js';
+import StandardEditor from 'ckeditor5-core/src/editor/standardeditor';
+import VirtualTestEditor from 'ckeditor5-core/tests/_utils/virtualtesteditor';
 
-import Plugin from 'ckeditor5/core/plugin.js';
-import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
+import Plugin from 'ckeditor5-core/src/plugin';
+import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
 
-import testUtils from 'tests/core/_utils/utils.js';
+import testUtils from 'ckeditor5-core/tests/_utils/utils';
 
 testUtils.createSinonSandbox();
 

+ 4 - 4
packages/ckeditor5-core/tests/_utils/classictesteditor.js

@@ -3,10 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
-import StandardEditor from 'ckeditor5/core/editor/standardeditor.js';
-import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
-import ClassicTestEditorUI from './classictesteditorui.js';
-import BoxedEditorUIView from 'ckeditor5/ui/editorui/boxed/boxededitoruiview.js';
+import StandardEditor from 'ckeditor5-core/src/editor/standardeditor';
+import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
+import ClassicTestEditorUI from './classictesteditorui';
+import BoxedEditorUIView from 'ckeditor5-ui/src/editorui/boxed/boxededitoruiview';
 
 /**
  * A simplified classic editor. Useful for testing features.

+ 2 - 2
packages/ckeditor5-core/tests/_utils/classictesteditorui.js

@@ -3,8 +3,8 @@
  * For licensing, see LICENSE.md.
  */
 
-import ComponentFactory from 'ckeditor5/ui/componentfactory.js';
-import FocusTracker from 'ckeditor5/utils/focustracker.js';
+import ComponentFactory from 'ckeditor5-ui/src/componentfactory';
+import FocusTracker from 'ckeditor5-utils/src/focustracker';
 
 /**
  * A simplified classic editor UI class. Useful for testing features.

+ 2 - 2
packages/ckeditor5-core/tests/_utils/modeltesteditor.js

@@ -3,8 +3,8 @@
  * For licensing, see LICENSE.md.
  */
 
-import Editor from 'ckeditor5/core/editor/editor.js';
-import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
+import Editor from 'ckeditor5-core/src/editor/editor';
+import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
 
 /**
  * A simple editor implementation with a functional model part of the engine (the document).

+ 2 - 2
packages/ckeditor5-core/tests/_utils/virtualtesteditor.js

@@ -3,8 +3,8 @@
  * For licensing, see LICENSE.md.
  */
 
-import StandardEditor from 'ckeditor5/core/editor/standardeditor.js';
-import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
+import StandardEditor from 'ckeditor5-core/src/editor/standardeditor';
+import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
 
 /**
  * A simple editor implementation useful for testing the engine part of the features.

+ 2 - 2
packages/ckeditor5-core/tests/command/command.js

@@ -3,8 +3,8 @@
  * For licensing, see LICENSE.md.
  */
 
-import Editor from 'ckeditor5/core/editor/editor.js';
-import Command from 'ckeditor5/core/command/command.js';
+import Editor from 'ckeditor5-core/src/editor/editor';
+import Command from 'ckeditor5-core/src/command/command';
 
 describe( 'Command', () => {
 	let editor, command;

+ 5 - 5
packages/ckeditor5-core/tests/command/helpers/getschemavalidranges.js

@@ -3,11 +3,11 @@
  * For licensing, see LICENSE.md.
  */
 
-import Document from 'ckeditor5/engine/model/document.js';
-import Range from 'ckeditor5/engine/model/range.js';
-import Selection from 'ckeditor5/engine/model/selection.js';
-import getSchemaValidRanges from 'ckeditor5/core/command/helpers/getschemavalidranges.js';
-import { setData, stringify } from 'ckeditor5/engine/dev-utils/model.js';
+import Document from 'ckeditor5-engine/src/model/document';
+import Range from 'ckeditor5-engine/src/model/range';
+import Selection from 'ckeditor5-engine/src/model/selection';
+import getSchemaValidRanges from 'ckeditor5-core/src/command/helpers/getschemavalidranges';
+import { setData, stringify } from 'ckeditor5-engine/src/dev-utils/model';
 
 describe( 'getSchemaValidRanges', () => {
 	const attribute = 'bold';

+ 3 - 3
packages/ckeditor5-core/tests/command/helpers/isattributeallowedinselection.js

@@ -3,9 +3,9 @@
  * For licensing, see LICENSE.md.
  */
 
-import Document from 'ckeditor5/engine/model/document.js';
-import isAttributeAllowedInSelection from 'ckeditor5/core/command/helpers/isattributeallowedinselection.js';
-import { setData } from 'ckeditor5/engine/dev-utils/model.js';
+import Document from 'ckeditor5-engine/src/model/document';
+import isAttributeAllowedInSelection from 'ckeditor5-core/src/command/helpers/isattributeallowedinselection';
+import { setData } from 'ckeditor5-engine/src/dev-utils/model';
 
 describe( 'isAttributeAllowedInSelection', () => {
 	const attribute = 'bold';

+ 7 - 7
packages/ckeditor5-core/tests/command/toggleattributecommand.js

@@ -3,13 +3,13 @@
  * For licensing, see LICENSE.md.
  */
 
-import Editor from 'ckeditor5/core/editor/editor.js';
-import Document from 'ckeditor5/engine/model/document.js';
-import Batch from 'ckeditor5/engine/model/batch.js';
-import ToggleAttributeCommand from 'ckeditor5/core/command/toggleattributecommand.js';
-import Range from 'ckeditor5/engine/model/range.js';
-import Position from 'ckeditor5/engine/model/position.js';
-import { setData, getData } from 'ckeditor5/engine/dev-utils/model.js';
+import Editor from 'ckeditor5-core/src/editor/editor';
+import Document from 'ckeditor5-engine/src/model/document';
+import Batch from 'ckeditor5-engine/src/model/batch';
+import ToggleAttributeCommand from 'ckeditor5-core/src/command/toggleattributecommand';
+import Range from 'ckeditor5-engine/src/model/range';
+import Position from 'ckeditor5-engine/src/model/position';
+import { setData, getData } from 'ckeditor5-engine/src/dev-utils/model';
 
 describe( 'ToggleAttributeCommand', () => {
 	const attrKey = 'bold';

+ 4 - 4
packages/ckeditor5-core/tests/editor/editor-base.js

@@ -5,10 +5,10 @@
 
 /* bender-tags: editor */
 
-import Editor from 'ckeditor5/core/editor/editor.js';
-import Command from 'ckeditor5/core/command/command.js';
-import Locale from 'ckeditor5/utils/locale.js';
-import CKEditorError from 'ckeditor5/utils/ckeditorerror.js';
+import Editor from 'ckeditor5-core/src/editor/editor';
+import Command from 'ckeditor5-core/src/command/command';
+import Locale from 'ckeditor5-utils/src/locale';
+import CKEditorError from 'ckeditor5-utils/src/ckeditorerror';
 
 describe( 'Editor', () => {
 	describe( 'locale', () => {

+ 4 - 4
packages/ckeditor5-core/tests/editor/editor.js

@@ -6,10 +6,10 @@
 /* globals setTimeout */
 /* bender-tags: editor, browser-only */
 
-import Editor from 'ckeditor5/core/editor/editor.js';
-import Plugin from 'ckeditor5/core/plugin.js';
-import Config from 'ckeditor5/utils/config.js';
-import PluginCollection from 'ckeditor5/core/plugincollection.js';
+import Editor from 'ckeditor5-core/src/editor/editor';
+import Plugin from 'ckeditor5-core/src/plugin';
+import Config from 'ckeditor5-utils/src/config';
+import PluginCollection from 'ckeditor5-core/src/plugincollection';
 
 class PluginA extends Plugin {
 	constructor( editor ) {

+ 6 - 6
packages/ckeditor5-core/tests/editor/standardeditor.js

@@ -6,13 +6,13 @@
 /* globals document */
 /* bender-tags: editor, browser-only */
 
-import StandardEditor from 'ckeditor5/core/editor/standardeditor.js';
-import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
-import { getData, setData } from 'ckeditor5/engine/dev-utils/model.js';
+import StandardEditor from 'ckeditor5-core/src/editor/standardeditor';
+import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
+import { getData, setData } from 'ckeditor5-engine/src/dev-utils/model';
 
-import EditingController from 'ckeditor5/engine/controller/editingcontroller.js';
-import KeystrokeHandler from 'ckeditor5/core/keystrokehandler.js';
-import Plugin from 'ckeditor5/core/plugin.js';
+import EditingController from 'ckeditor5-engine/src/controller/editingcontroller';
+import KeystrokeHandler from 'ckeditor5-core/src/keystrokehandler';
+import Plugin from 'ckeditor5-core/src/plugin';
 
 describe( 'StandardEditor', () => {
 	let editorElement;

+ 3 - 3
packages/ckeditor5-core/tests/keystrokehandler.js

@@ -5,9 +5,9 @@
 
 /* bender-tags: browser-only */
 
-import VirtualTestEditor from 'tests/core/_utils/virtualtesteditor.js';
-import KeystrokeHandler from 'ckeditor5/core/keystrokehandler.js';
-import { keyCodes } from 'ckeditor5/utils/keyboard.js';
+import VirtualTestEditor from 'ckeditor5-core/tests/_utils/virtualtesteditor';
+import KeystrokeHandler from 'ckeditor5-core/src/keystrokehandler';
+import { keyCodes } from 'ckeditor5-utils/src/keyboard';
 
 describe( 'KeystrokeHandler', () => {
 	let editor;

+ 2 - 2
packages/ckeditor5-core/tests/plugin.js

@@ -3,8 +3,8 @@
  * For licensing, see LICENSE.md.
  */
 
-import Plugin from 'ckeditor5/core/plugin.js';
-import Editor from 'ckeditor5/core/editor/editor.js';
+import Plugin from 'ckeditor5-core/src/plugin';
+import Editor from 'ckeditor5-core/src/editor/editor';
 
 let editor;
 

+ 6 - 6
packages/ckeditor5-core/tests/plugincollection.js

@@ -5,12 +5,12 @@
 
 /* bender-tags: browser-only */
 
-import testUtils from 'tests/core/_utils/utils.js';
-import Editor from 'ckeditor5/core/editor/editor.js';
-import PluginCollection from 'ckeditor5/core/plugincollection.js';
-import Plugin from 'ckeditor5/core/plugin.js';
-import CKEditorError from 'ckeditor5/utils/ckeditorerror.js';
-import log from 'ckeditor5/utils/log.js';
+import testUtils from 'ckeditor5-core/tests/_utils/utils';
+import Editor from 'ckeditor5-core/src/editor/editor';
+import PluginCollection from 'ckeditor5-core/src/plugincollection';
+import Plugin from 'ckeditor5-core/src/plugin';
+import CKEditorError from 'ckeditor5-utils/src/ckeditorerror';
+import log from 'ckeditor5-utils/src/log';
 
 let editor;
 let PluginA, PluginB, PluginC, PluginD, PluginE, PluginF, PluginG, PluginH, PluginI, PluginX;