Procházet zdrojové kódy

Other: Rename tables to table.

Maciej Gołaszewski před 8 roky
rodič
revize
d3adb282a5

+ 4 - 4
packages/ckeditor5-table/src/tables.js → packages/ckeditor5-table/src/table.js

@@ -4,13 +4,13 @@
  */
 
 /**
- * @module tables/tables
+ * @module table/table
  */
 
-import Plugin from '../../ckeditor5-core/src/plugin';
+import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
-import TablesEditing from './tablesediting';
-import TablesUI from './tablesui';
+import TablesEditing from './tableediting';
+import TablesUI from './tableui';
 
 export default class Tables extends Plugin {
 	/**

+ 3 - 3
packages/ckeditor5-table/src/tablesediting.js → packages/ckeditor5-table/src/tableediting.js

@@ -4,11 +4,11 @@
  */
 
 /**
- * @module tables/tablesediting
+ * @module table/tableediting
  */
 
-import Plugin from '../../ckeditor5-core/src/plugin';
-import { upcastElementToElement } from '../../ckeditor5-engine/src/conversion/upcast-converters';
+import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
+import { upcastElementToElement } from '@ckeditor/ckeditor5-engine/src/conversion/upcast-converters';
 import { createTableCell, createTableRow, downcastTableCell, downcastTable } from './converters';
 
 export default class TablesEditing extends Plugin {

+ 3 - 3
packages/ckeditor5-table/src/tablesui.js → packages/ckeditor5-table/src/tableui.js

@@ -4,10 +4,10 @@
  */
 
 /**
- * @module tables/tablesui
+ * @module table/tableui
  */
 
-import Plugin from '../../ckeditor5-core/src/plugin';
+import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
-export default class TablesUI extends Plugin {
+export default class TableUI extends Plugin {
 }

+ 0 - 0
packages/ckeditor5-table/tests/manual/tables.html → packages/ckeditor5-table/tests/manual/table.html


+ 4 - 4
packages/ckeditor5-table/tests/manual/tables.js → packages/ckeditor5-table/tests/manual/table.js

@@ -5,13 +5,13 @@
 
 /* globals console, window, document */
 
-import ClassicEditor from '../../../ckeditor5-editor-classic/src/classiceditor';
-import ArticlePluginSet from '../../../ckeditor5-core/tests/_utils/articlepluginset';
-import Tables from '../../src/tables';
+import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
+import Table from '../../src/table';
 
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
-		plugins: [ ArticlePluginSet, Tables ],
+		plugins: [ ArticlePluginSet, Table ],
 		toolbar: [
 			'headings', '|', 'bold', 'italic', 'undo', 'redo'
 		]

+ 0 - 0
packages/ckeditor5-table/tests/manual/tables.md → packages/ckeditor5-table/tests/manual/table.md


+ 39 - 0
packages/ckeditor5-table/tests/table.js

@@ -0,0 +1,39 @@
+/**
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* global document */
+
+import Table from '../src/table';
+import TableEditing from '../src/tableediting';
+import TableUI from '../src/tableui';
+
+import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
+
+describe( 'Table', () => {
+	let editor, element;
+
+	beforeEach( () => {
+		element = document.createElement( 'div' );
+		document.body.appendChild( element );
+
+		return ClassicTestEditor
+			.create( element, {
+				plugins: [ Table ]
+			} )
+			.then( newEditor => {
+				editor = newEditor;
+			} );
+	} );
+
+	afterEach( () => {
+		element.remove();
+
+		return editor.destroy();
+	} );
+
+	it( 'requires TableEditing and TableUI', () => {
+		expect( Table.requires ).to.deep.equal( [ TableEditing, TableUI ] );
+	} );
+} );

+ 6 - 6
packages/ckeditor5-table/tests/tablesediting.js → packages/ckeditor5-table/tests/tableediting.js

@@ -3,20 +3,20 @@
  * For licensing, see LICENSE.md.
  */
 
-import TablesEditing from '../src/tablesediting';
+import TableEditing from '../src/tableediting';
 
-import Paragraph from '../../ckeditor5-paragraph/src/paragraph';
+import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-import VirtualTestEditor from '../../ckeditor5-core/tests/_utils/virtualtesteditor';
-import { getData as getModelData, setData as setModelData } from '../../ckeditor5-engine/src/dev-utils/model';
+import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
+import { getData as getModelData, setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 
-describe( 'TablesEditing', () => {
+describe( 'TableEditing', () => {
 	let editor, model;
 
 	beforeEach( () => {
 		return VirtualTestEditor
 			.create( {
-				plugins: [ TablesEditing, Paragraph ]
+				plugins: [ TableEditing, Paragraph ]
 			} )
 			.then( newEditor => {
 				editor = newEditor;

+ 0 - 41
packages/ckeditor5-table/tests/tables.js

@@ -1,41 +0,0 @@
-/**
- * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
-
-/* global document */
-
-import Tables from '../src/tables';
-import TablesEditing from '../src/tablesediting';
-import TablesUI from '../src/tablesui';
-
-import ClassicTestEditor from '../../ckeditor5-core/tests/_utils/classictesteditor';
-import { getData as getModelData, setData as setModelData } from '../../ckeditor5-engine/src/dev-utils/model';
-import normalizeHtml from '../../ckeditor5-utils/tests/_utils/normalizehtml';
-
-describe( 'Tables', () => {
-	let editor, element;
-
-	beforeEach( () => {
-		element = document.createElement( 'div' );
-		document.body.appendChild( element );
-
-		return ClassicTestEditor
-			.create( element, {
-				plugins: [ Tables ]
-			} )
-			.then( newEditor => {
-				editor = newEditor;
-			} );
-	} );
-
-	afterEach( () => {
-		element.remove();
-
-		return editor.destroy();
-	} );
-
-	it( 'requires TablesEditing and TablesUI', () => {
-		expect( Tables.requires ).to.deep.equal( [ TablesEditing, TablesUI ] );
-	} );
-} );

+ 7 - 7
packages/ckeditor5-table/tests/tablesui.js → packages/ckeditor5-table/tests/tableui.js

@@ -5,16 +5,16 @@
 
 /* global document */
 
-import TablesEditing from '../src/tablesediting';
-import TablesUI from '../src/tablesui';
+import TableEditing from '../src/tableediting';
+import TableUI from '../src/tableui';
 
-import ClassicTestEditor from '../../ckeditor5-core/tests/_utils/classictesteditor';
-import testUtils from '../../ckeditor5-core/tests/_utils/utils';
-import { _clear as clearTranslations, add as addTranslations } from '../../ckeditor5-utils/src/translation-service';
+import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
+import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
+import { _clear as clearTranslations, add as addTranslations } from '@ckeditor/ckeditor5-utils/src/translation-service';
 
 testUtils.createSinonSandbox();
 
-describe( 'TablesUI', () => {
+describe( 'TableUI', () => {
 	let editor, element;
 
 	before( () => {
@@ -32,7 +32,7 @@ describe( 'TablesUI', () => {
 
 		return ClassicTestEditor
 			.create( element, {
-				plugins: [ TablesEditing, TablesUI ]
+				plugins: [ TableEditing, TableUI ]
 			} )
 			.then( newEditor => {
 				editor = newEditor;