Ver código fonte

Renamed the config file, updated README and aligned to new API of dev-utils - bundler.

Kamil Piechaczek 8 anos atrás
pai
commit
8dca94f360

+ 1 - 1
packages/ckeditor5-build-classic/README.md

@@ -63,7 +63,7 @@ ClassicEditor.create( document.querySelector( '#editor' ) )
 
 **Note:** This section assumes that you cloned this package repository and execute the commands inside it.
 
-You can modify `config-editor.js`, `config-build.js` or any of the Webpack configs and run:
+You can modify `build-config.js` or any of the Webpack configs and run:
 
 ```
 npm run build

+ 2 - 2
packages/ckeditor5-build-classic/bin/create-entry-file.js

@@ -8,10 +8,10 @@
 'use strict';
 
 const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
-const buildConfig = require( '../config-build' );
+const buildConfig = require( '../build-config' );
 
 console.log( 'Creating the entry file...' );
 
-bundler.createEntryFile( 'ckeditor.js', './config-build', buildConfig );
+bundler.createEntryFile( 'ckeditor.js', buildConfig );
 
 console.log( 'Done.' );

packages/ckeditor5-build-classic/config-build.js → packages/ckeditor5-build-classic/build-config.js


+ 22 - 1
packages/ckeditor5-build-classic/ckeditor.js

@@ -36,5 +36,26 @@ ClassicEditor.build = {
 		ListPlugin,
 		ParagraphPlugin
 	],
-	config: require( './config-build' ).config
+	config: {
+		toolbar: [
+			'headings',
+			'bold',
+			'italic',
+			'link',
+			'unlink',
+			'bulletedList',
+			'numberedList',
+			'blockQuote',
+			'undo',
+			'redo'
+		],
+		image: {
+			toolbar: [
+				'imageStyleFull',
+				'imageStyleSide',
+				'|',
+				'imageTextAlternative'
+			]
+		}
+	}
 };