Browse Source

Merge pull request #14 from ckeditor/t/11

Feature: Support for building the editor in another language than `en`. Closes #11.
Piotrek Koszuliński 8 years ago
parent
commit
63a814c2a5

+ 10 - 0
packages/ckeditor5-build-classic/build-config.js

@@ -6,8 +6,13 @@
 'use strict';
 
 module.exports = {
+	// The editor creator to use.
 	editor: '@ckeditor/ckeditor5-editor-classic/src/classiceditor',
+
+	// The name under which the editor will be exported.
 	moduleName: 'ClassicEditor',
+
+	// Plugins to include in the build.
 	plugins: [
 		'@ckeditor/ckeditor5-presets/src/essentials',
 
@@ -24,6 +29,11 @@ module.exports = {
 		'@ckeditor/ckeditor5-list/src/list',
 		'@ckeditor/ckeditor5-paragraph/src/paragraph',
 	],
+
+	// UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format.
+	language: 'en',
+
+	// Editor config.
 	config: {
 		toolbar: [
 			'headings',

File diff suppressed because it is too large
+ 1 - 1
packages/ckeditor5-build-classic/build/ckeditor.compat.js


File diff suppressed because it is too large
+ 1 - 1
packages/ckeditor5-build-classic/build/ckeditor.compat.js.map


File diff suppressed because it is too large
+ 1 - 1
packages/ckeditor5-build-classic/build/ckeditor.js


File diff suppressed because it is too large
+ 1 - 1
packages/ckeditor5-build-classic/build/ckeditor.js.map


+ 1 - 0
packages/ckeditor5-build-classic/package.json

@@ -18,6 +18,7 @@
   },
   "devDependencies": {
     "@ckeditor/ckeditor5-dev-utils": "^3.0.0",
+    "@ckeditor/ckeditor5-dev-webpack-plugin": "^2.0.11",
     "babel-core": "^6.24.0",
     "babel-loader": "^6.4.0",
     "babel-preset-env": "^1.2.2",

+ 5 - 1
packages/ckeditor5-build-classic/webpack.compat.config.js

@@ -8,8 +8,9 @@
 const path = require( 'path' );
 const webpack = require( 'webpack' );
 const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
-
+const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
 const BabiliPlugin = require( 'babili-webpack-plugin' );
+const buildConfig = require( './build-config' );
 
 module.exports = {
 	devtool: 'source-map',
@@ -26,6 +27,9 @@ module.exports = {
 	},
 
 	plugins: [
+		new CKEditorWebpackPlugin( {
+			languages: [ buildConfig.language ]
+		} ),
 		new BabiliPlugin( null, {
 			comments: false
 		} ),

+ 5 - 1
packages/ckeditor5-build-classic/webpack.config.js

@@ -8,8 +8,9 @@
 const path = require( 'path' );
 const webpack = require( 'webpack' );
 const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
-
+const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
 const BabiliPlugin = require( 'babili-webpack-plugin' );
+const buildConfig = require( './build-config' );
 
 module.exports = {
 	devtool: 'source-map',
@@ -23,6 +24,9 @@ module.exports = {
 	},
 
 	plugins: [
+		new CKEditorWebpackPlugin( {
+			languages: [ buildConfig.language ]
+		} ),
 		new BabiliPlugin( null, {
 			comments: false
 		} ),