Ver código fonte

Renamed ckeditor5-core to ckeditor5-engine.

Piotrek Koszuliński 9 anos atrás
pai
commit
fc3b343313

+ 12 - 6
README.md

@@ -27,17 +27,23 @@ The project is split into several different repositories, as described in the [d
 
 The [ckeditor5](https://github.com/ckeditor/ckeditor5) repository is the place that centralizes the development of CKEditor 5. It bundles different repositories into a single place, adding the necessary helper tools for the development workflow, like the builder and the test runner. [Basic information on how to setup the development environment](https://github.com/ckeditor/ckeditor5/wiki/Development-Environment) can be found in the wiki pages.
 
-A key repository is [ckeditor5-core](https://github.com/ckeditor/ckeditor5-core), which keeps the editor's core modules such as the basic infrastructure, the data model and the basic classes for UI libraries. **Most of the development happens in this repository**.
+The [ckeditor5](https://github.com/ckeditor/ckeditor5) repository contains also the core classes which implements the base architecture of the CKEditor 5 framework.
 
-![CKEditor 5 Development repository = Developer Tools (builder, test runner) + NPM packages (ckeditor5-core and others)](https://cloud.githubusercontent.com/assets/630060/12577912/d5c32244-c41d-11e5-8b09-2dd97a1abb05.png)
+Another key repositories are:
+
+* [ckeditor5-engine](https://github.com/ckeditor/ckeditor5-engine), which keeps the **editor's editing engine** (data model, editing and data views, etc.). Big part of the development happens in this repository, as the engine is the base of the editor.
+* [ckeditor5-ui](https://github.com/ckeditor/ckeditor5-ui) and [ckeditor5-ui-default](https://github.com/ckeditor/ckeditor5-ui-default), which keep the UI framework and default UI library (based on this framework). The official features use these packages to create their UI.
+
+**TODO: Add an architecture diagram.**
 
 ### Reporting Issues and Feature Requests
 
 Each repository independently handles its issues, so focus is kept on their scope:
-[ckeditor5-design](https://github.com/ckeditor/ckeditor5-design): issues related to macro program design, not going into the specifics of other repos.
-[ckeditor5](https://github.com/ckeditor/ckeditor5): issues related to the development environment and workflow.
-[ckeditor5-core](https://github.com/ckeditor/ckeditor5-core): issues related to the core API.
-other [ckeditor5-*](https://github.com/ckeditor?utf8=%E2%9C%93&query=ckeditor5-) repos: issues related to all other parts of the code, like features, UI libraries, themes, etc.
+
+* [ckeditor5-design](https://github.com/ckeditor/ckeditor5-design): issues related to macro program design, not going into the specifics of other repos.
+* [ckeditor5](https://github.com/ckeditor/ckeditor5): issues related to the core API as well as the development environment and workflow. When you don't know where to report an issue, report it here.
+* [ckeditor5-engine](https://github.com/ckeditor/ckeditor5-engine): issues related to the engine API.
+* other [ckeditor5-*](https://github.com/ckeditor?utf8=%E2%9C%93&query=ckeditor5-) repos: issues related to all other parts of the code, like features, UI libraries, themes, etc.
 
 ## License
 

+ 1 - 1
package.json

@@ -8,7 +8,7 @@
     "WYSIWYG"
   ],
   "dependencies": {
-    "ckeditor5-core": "ckeditor/ckeditor5-core",
+    "ckeditor5-engine": "ckeditor/ckeditor5-engine",
     "ckeditor5-ui": "ckeditor/ckeditor5-ui",
     "ckeditor5-ui-default": "ckeditor/ckeditor5-ui-default",
     "ckeditor5-utils": "ckeditor/ckeditor5-utils",

+ 12 - 12
src/command/attributecommand.js

@@ -6,17 +6,17 @@
 'use strict';
 
 import Command from './command.js';
-import TreeWalker from '../core/treemodel/treewalker.js';
-import Range from '../core/treemodel/range.js';
+import TreeWalker from '../engine/treemodel/treewalker.js';
+import Range from '../engine/treemodel/range.js';
 
 /**
  * An extension of basic {@link ckeditor5.command.Command} class, which provides utilities for a command that sets a single
- * attribute on a text or element with value `true`. AttributeCommand uses {@link core.treeModel.Document#selection} to
+ * attribute on a text or element with value `true`. AttributeCommand uses {@link engine.treeModel.Document#selection} to
  * decide which nodes (if any) should be changed, and applies or removes attributes from them.
- * See {@link core.treeView.Converter#execute} for more.
+ * See {@link engine.treeView.Converter#execute} for more.
  *
- * The command checks {@link core.treeModel.Document#schema} to decide if it should be enabled.
- * See {@link core.treeView.Converter#checkSchema} for more.
+ * The command checks {@link engine.treeModel.Document#schema} to decide if it should be enabled.
+ * See {@link engine.treeView.Converter#checkSchema} for more.
  *
  * @memberOf ckeditor5.command
  */
@@ -50,7 +50,7 @@ export default class AttributeCommand extends Command {
 	}
 
 	/**
-	 * Checks {@link core.treeModel.Document#schema} to decide if the command should be enabled:
+	 * Checks {@link engine.treeModel.Document#schema} to decide if the command should be enabled:
 	 * * if selection is on range, the command is enabled if any of nodes in that range can have bold,
 	 * * if selection is collapsed, the command is enabled if text with bold is allowed in that node.
 	 *
@@ -98,10 +98,10 @@ export default class AttributeCommand extends Command {
 	 *
 	 * If the command is active (`value == true`), it will remove attributes. Otherwise, it will set attributes.
 	 *
-	 * The execution result differs, depending on the {@link core.treeModel.Document#selection}:
+	 * The execution result differs, depending on the {@link engine.treeModel.Document#selection}:
 	 * * if selection is on a range, the command applies the attribute on all nodes in that ranges
-	 * (if they are allowed to have this attribute by the{@link core.treeModel.Schema schema}),
-	 * * if selection is collapsed in non-empty node, the command applies attribute to the {@link core.treeModel.Document#selection}
+	 * (if they are allowed to have this attribute by the{@link engine.treeModel.Schema schema}),
+	 * * if selection is collapsed in non-empty node, the command applies attribute to the {@link engine.treeModel.Document#selection}
 	 * itself (note that typed characters copy attributes from selection),
 	 * * if selection is collapsed in empty node, the command applies attribute to the parent node of selection (note
 	 * that selection inherits all attributes from a node if it is in empty node).
@@ -147,8 +147,8 @@ export default class AttributeCommand extends Command {
 	 * attribute set. This is done by breaking a range in two and omitting the not allowed part.
 	 *
 	 * @private
-	 * @param {Array.<core.treeModel.Range>} ranges Ranges to be validated.
-	 * @returns {Array.<core.treeModel.Range>} Ranges without invalid parts.
+	 * @param {Array.<engine.treeModel.Range>} ranges Ranges to be validated.
+	 * @returns {Array.<engine.treeModel.Range>} Ranges without invalid parts.
 	 */
 	_getSchemaValidRanges( ranges ) {
 		const validRanges = [];

+ 1 - 1
src/command/command.js

@@ -120,7 +120,7 @@ export default class Command {
 	 *
 	 * @protected
 	 * @method ckeditor5.command.Command#_checkEnabled
-	 * @returns {Boolean} `true` if command should be enabled according to {@link core.treeModel.Document#schema}. `false` otherwise.
+	 * @returns {Boolean} `true` if command should be enabled according to {@link engine.treeModel.Document#schema}. `false` otherwise.
 	 */
 }
 

+ 2 - 2
src/editor.js

@@ -8,7 +8,7 @@
 import ObservableMixin from './utils/observablemixin.js';
 import EditorConfig from './editorconfig.js';
 import PluginCollection from './plugincollection.js';
-import Document from './core/treemodel/document.js';
+import Document from './engine/treemodel/document.js';
 import CKEditorError from './utils/ckeditorerror.js';
 import Locale from './utils/locale.js';
 import isArray from './utils/lib/lodash/isArray.js';
@@ -64,7 +64,7 @@ export default class Editor {
 		 * Tree Model document managed by this editor.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Document} ckeditor5.Editor#document
+		 * @member {engine.treeModel.Document} ckeditor5.Editor#document
 		 */
 		this.document = new Document();
 

+ 2 - 2
src/load__amd.js

@@ -12,7 +12,7 @@ import require from 'require';
 /**
  * Loads a module.
  *
- *		load( 'ckeditor5/core/editor.js' )
+ *		load( 'ckeditor5/editor.js' )
  *			.then( ( EditorModule ) => {
  *				const Editor = EditorModule.default;
  *			} );
@@ -34,4 +34,4 @@ export default function load( modulePath ) {
 			}
 		);
 	} );
-}
+}

+ 2 - 2
tests/_utils-tests/module__amd.js

@@ -23,9 +23,9 @@ describe( 'amdTestUtils', () => {
 		} );
 
 		it( 'generates an absolute path from a simple path', () => {
-			const path = getModulePath( 'core/editor' );
+			const path = getModulePath( 'engine/treeview' );
 
-			expect( path ).to.equal( '/ckeditor5/core/editor.js' );
+			expect( path ).to.equal( '/ckeditor5/engine/treeview.js' );
 		} );
 
 		it( 'does not process an absolute path', () => {

+ 4 - 4
tests/_utils/module__amd.js

@@ -63,11 +63,11 @@ const utils = {
 	 *		PluginF.requires = [ PluginE ];
 	 *		PluginE.requires = [ PluginF ];
 	 *
-	 *		amdTestUtils.define( 'E', [ 'core/plugin', 'F' ], () => {
+	 *		amdTestUtils.define( 'E/E', [ 'plugin', 'F/F' ], () => {
 	 *			return PluginE;
 	 *		} );
 	 *
-	 *		amdTestUtils.define( 'E', [ 'core/plugin', 'E' ], () => {
+	 *		amdTestUtils.define( 'F/F', [ 'plugin', 'E/E' ], () => {
 	 *			return PluginF;
 	 *		} );
 	 *
@@ -100,10 +100,10 @@ const utils = {
 	 * This method uses {@link #getModulePath} to process module and dependency paths so you need to use
 	 * the simplified notation.
 	 *
-	 *		const modules = amdTestUtils.require( { editor: 'core/Editor' } );
+	 *		const modules = amdTestUtils.require( { treeView: 'engine/treeview/treeview' } );
 	 *
 	 *		// Later on, inside tests:
-	 *		const Editor = modules.editor;
+	 *		const TreeView = modules.treeView;
 	 *
 	 * @params {Object} modules The object (`ref => modulePath`) with modules to be loaded.
 	 * @returns {Object} The object that will hold the loaded modules.

+ 1 - 1
tests/_utils/ui/floatingtoolbar/floatingtoolbarview.js

@@ -18,7 +18,7 @@ export default class FloatingToolbarView extends ToolbarView {
 		);
 
 		// This has a high risk of breaking if someone defines "on" in the parent template.
-		// See https://github.com/ckeditor/ckeditor5-core/issues/219
+		// See https://github.com/ckeditor/ckeditor5-engine/issues/219
 		this.template.on = {
 			// Added just for fun, but needed to keep the focus in the editable.
 			mousedown: ( evt ) => evt.preventDefault()

+ 4 - 4
tests/command/attributecommand.js

@@ -7,10 +7,10 @@
 
 import Editor from '/ckeditor5/editor.js';
 import AttributeCommand from '/ckeditor5/command/attributecommand.js';
-import Text from '/ckeditor5/core/treemodel/text.js';
-import Range from '/ckeditor5/core/treemodel/range.js';
-import Position from '/ckeditor5/core/treemodel/position.js';
-import Element from '/ckeditor5/core/treemodel/element.js';
+import Text from '/ckeditor5/engine/treemodel/text.js';
+import Range from '/ckeditor5/engine/treemodel/range.js';
+import Position from '/ckeditor5/engine/treemodel/position.js';
+import Element from '/ckeditor5/engine/treemodel/element.js';
 
 let element, editor, command, modelDoc, root;