Piotrek Koszuliński 10 роки тому
батько
коміт
4068fd4554

+ 4 - 4
packages/ckeditor5-engine/src/collection.js

@@ -5,6 +5,10 @@
 
 'use strict';
 
+import EmitterMixin from './emittermixin.js';
+import CKEditorError from './ckeditorerror.js';
+import utilsObject from './lib/lodash/object.js';
+
 /**
  * Collections are ordered sets of objects. Items in the collection can be retrieved by their indexes
  * in the collection (like in an array) or by their ids.
@@ -19,10 +23,6 @@
  * @mixins EventEmitter
  */
 
-import EmitterMixin from './emittermixin.js';
-import CKEditorError from './ckeditorerror.js';
-import utilsObject from './lib/lodash/object.js';
-
 export default class Collection {
 	/**
 	 * Creates a new Collection instance.

+ 3 - 3
packages/ckeditor5-engine/src/config.js

@@ -5,6 +5,9 @@
 
 'use strict';
 
+import Model from './model.js';
+import utilsLang from './lib/lodash/lang.js';
+
 /**
  * Handles a configuration dictionary.
  *
@@ -12,9 +15,6 @@
  * @extends Model
  */
 
-import Model from './model.js';
-import utilsLang from './lib/lodash/lang.js';
-
 export default class Config extends Model {
 	/**
 	 * Creates an instance of the {@link Config} class.

+ 2 - 2
packages/ckeditor5-engine/src/creator.js

@@ -5,6 +5,8 @@
 
 'use strict';
 
+import Plugin from './plugin.js';
+
 /**
  * Basic creator class.
  *
@@ -12,7 +14,5 @@
  * @extends core.Plugin
  */
 
-import Plugin from './plugin.js';
-
 export default class Creator extends Plugin {
 }

+ 3 - 3
packages/ckeditor5-engine/src/editorconfig.js

@@ -5,6 +5,9 @@
 
 'use strict';
 
+import CKEDITOR from '../ckeditor.js';
+import Config from './config.js';
+
 /**
  * Handles a configuration dictionary for an editor instance.
  *
@@ -15,9 +18,6 @@
  * @extends Config
  */
 
-import CKEDITOR from '../ckeditor.js';
-import Config from './config.js';
-
 export default class EditorConfig extends Config {
 	/**
 	 * @inheritdoc core.Config#get

+ 2 - 2
packages/ckeditor5-engine/src/eventinfo.js

@@ -5,6 +5,8 @@
 
 'use strict';
 
+import utils from './utils.js';
+
 /**
  * The event object passed to event callbacks. It is used to provide information about the event as well as a tool to
  * manipulate it.
@@ -12,8 +14,6 @@
  * @class EventInfo
  */
 
-import utils from './utils.js';
-
 export default class EventInfo {
 	constructor( source, name ) {
 		/**

+ 5 - 5
packages/ckeditor5-engine/src/model.js

@@ -5,6 +5,11 @@
 
 'use strict';
 
+import EmitterMixin from './emittermixin.js';
+import CKEditorError from './ckeditorerror.js';
+import utilsObject from './lib/lodash/object.js';
+import utilsLang from './lib/lodash/lang.js';
+
 /**
  * The base MVC model class.
  *
@@ -12,11 +17,6 @@
  * @mixins EventEmitter
  */
 
-import EmitterMixin from './emittermixin.js';
-import CKEditorError from './ckeditorerror.js';
-import utilsObject from './lib/lodash/object.js';
-import utilsLang from './lib/lodash/lang.js';
-
 export default class Model {
 	/**
 	 * Creates a new Model instance.

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

@@ -5,6 +5,8 @@
 
 'use strict';
 
+import Model from './model.js';
+
 /**
  * The base class for CKEditor plugin classes.
  *
@@ -12,8 +14,6 @@
  * @extends core.Model
  */
 
-import Model from './model.js';
-
 export default class Plugin extends Model {
 	/**
 	 * Creates a new Plugin instance.

+ 6 - 6
packages/ckeditor5-engine/src/plugincollection.js

@@ -5,18 +5,18 @@
 
 'use strict';
 
-/**
- * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.
- *
- * @class PluginCollection
- */
-
 import pathUtils from '../ckeditor5/path.js';
 import Plugin from './plugin.js';
 import CKEditorError from './ckeditorerror.js';
 import log from './log.js';
 import load from '../ckeditor5/load.js';
 
+/**
+ * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.
+ *
+ * @class PluginCollection
+ */
+
 export default class PluginCollection {
 	/**
 	 * Creates an instance of the PluginCollection class, initializing it with a set of plugins.

+ 10 - 10
packages/ckeditor5-engine/src/treemodel/batch.js

@@ -10,19 +10,19 @@
 // To solve circular dependencies (deltas need to require Batch class), Batch class body is moved
 // to treemodel/delta/batch-base.
 
-import Batch from './delta/batch-base';
+import Batch from './delta/batch-base.js';
 
 /* jshint ignore:start */
 
-import d1 from './delta/insertdelta';
-import d2 from './delta/weakinsertdelta';
-import d3 from './delta/movedelta';
-import d4 from './delta/removedelta';
-import d5 from './delta/attributedelta';
-import d6 from './delta/splitdelta';
-import d7 from './delta/mergedelta';
-import d8 from './delta/wrapdelta';
-import d9 from './delta/unwrapdelta';
+import d1 from './delta/insertdelta.js';
+import d2 from './delta/weakinsertdelta.js';
+import d3 from './delta/movedelta.js';
+import d4 from './delta/removedelta.js';
+import d5 from './delta/attributedelta.js';
+import d6 from './delta/splitdelta.js';
+import d7 from './delta/mergedelta.js';
+import d8 from './delta/wrapdelta.js';
+import d9 from './delta/unwrapdelta.js';
 
 /* jshint ignore:end */
 

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/insertdelta.js

@@ -7,7 +7,7 @@
 
 import Delta from './delta.js';
 import register from './register.js';
-import InsertOperation from '../operation/insertoperation';
+import InsertOperation from '../operation/insertoperation.js';
 
 /**
  * To provide specific OT behavior and better collisions solving, the {@link treeModel.Batch#insert} method

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/document.js

@@ -9,7 +9,7 @@ import RootElement from './rootelement.js';
 import Batch from './batch.js';
 import Selection from './selection.js';
 import EmitterMixin from '../emittermixin.js';
-import CKEditorError from '../ckeditorerror';
+import CKEditorError from '../ckeditorerror.js';
 import objectUtils from '../lib/lodash/object.js';
 
 const graveyardSymbol = Symbol( 'graveyard' );

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/node.js

@@ -7,7 +7,7 @@
 
 import AttributeList from './attributelist.js';
 import langUtils from '../lib/lodash/lang.js';
-import CKEditorError from '../ckeditorerror';
+import CKEditorError from '../ckeditorerror.js';
 
 /**
  * Abstract document tree node class.

+ 8 - 8
packages/ckeditor5-engine/src/treemodel/operation/transform.js

@@ -5,6 +5,14 @@
 
 'use strict';
 
+import InsertOperation from './insertoperation.js';
+import AttributeOperation from './attributeoperation.js';
+import MoveOperation from './moveoperation.js';
+import NoOperation from './nooperation.js';
+import Position from '../position.js';
+import Range from '../range.js';
+import utils from '../../utils.js';
+
 /**
  * Transforms given {treeModel.operation.Operation} by another {treeModel.operation.Operation} and returns the result of
  * that transformation as an array containing one or more {treeModel.operation.Operation} elements.
@@ -43,14 +51,6 @@
  * @returns {Array.<treeModel.operation.Operation>} Result of the transformation.
  */
 
-import InsertOperation from './insertoperation.js';
-import AttributeOperation from './attributeoperation.js';
-import MoveOperation from './moveoperation.js';
-import NoOperation from './nooperation.js';
-import Position from '../position.js';
-import Range from '../range.js';
-import utils from '../../utils.js';
-
 export default transform;
 
 const ot = {