Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 8697aac

Browse files
committed
Other: Changed the build structure. TODO. Closes ckeditor/ckeditor5#1038.
1 parent 9c1fa4e commit 8697aac

File tree

6 files changed

+22
-109
lines changed

6 files changed

+22
-109
lines changed

bin/build-ckeditor.sh

-9
This file was deleted.

bin/create-entry-file.js

-18
This file was deleted.

build-config.js

-61
This file was deleted.

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@
6161
"url": "https://github.com/ckeditor/ckeditor5-build-inline.git"
6262
},
6363
"scripts": {
64-
"build": "npm run create-entry-file && npm run build-ckeditor",
65-
"create-entry-file": "node bin/create-entry-file.js",
66-
"build-ckeditor": "sh bin/build-ckeditor.sh",
64+
"build": "webpack --mode production",
6765
"preversion": "npm run build; if [ -n \"$(git status src/ckeditor.js build/ --porcelain)\" ]; then git add -u src/ckeditor.js build/ && git commit -m 'Internal: Build.'; fi"
6866
}
6967
}

src/ckeditor.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55

66
import InlineEditorBase from '@ckeditor/ckeditor5-editor-inline/src/inlineeditor';
77
import EssentialsPlugin from '@ckeditor/ckeditor5-essentials/src/essentials';
8-
import UploadadapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
8+
import UploadAdapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
99
import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
1010
import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
1111
import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
12-
import BlockquotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
13-
import EasyimagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
12+
import BlockQuotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
13+
import EasyImagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
1414
import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
1515
import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';
16-
import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
17-
import ImagestylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
18-
import ImagetoolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
19-
import ImageuploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
16+
import ImageCaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
17+
import ImageStylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
18+
import ImageToolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
19+
import ImageUploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
2020
import LinkPlugin from '@ckeditor/ckeditor5-link/src/link';
2121
import ListPlugin from '@ckeditor/ckeditor5-list/src/list';
2222
import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';
@@ -25,18 +25,18 @@ export default class InlineEditor extends InlineEditorBase {}
2525

2626
InlineEditor.builtinPlugins = [
2727
EssentialsPlugin,
28-
UploadadapterPlugin,
28+
UploadAdapterPlugin,
2929
AutoformatPlugin,
3030
BoldPlugin,
3131
ItalicPlugin,
32-
BlockquotePlugin,
33-
EasyimagePlugin,
32+
BlockQuotePlugin,
33+
EasyImagePlugin,
3434
HeadingPlugin,
3535
ImagePlugin,
36-
ImagecaptionPlugin,
37-
ImagestylePlugin,
38-
ImagetoolbarPlugin,
39-
ImageuploadPlugin,
36+
ImageCaptionPlugin,
37+
ImageStylePlugin,
38+
ImageToolbarPlugin,
39+
ImageUploadPlugin,
4040
LinkPlugin,
4141
ListPlugin,
4242
ParagraphPlugin

webpack.config.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const webpack = require( 'webpack' );
1212
const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' );
1313
const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
1414
const UglifyJsWebpackPlugin = require( 'uglifyjs-webpack-plugin' );
15-
const buildConfig = require( './build-config' );
1615

1716
module.exports = {
1817
devtool: 'source-map',
@@ -21,11 +20,13 @@ module.exports = {
2120
entry: path.resolve( __dirname, 'src', 'ckeditor.js' ),
2221

2322
output: {
23+
// The name under which the editor will be exported.
24+
library: 'InlineEditor',
25+
2426
path: path.resolve( __dirname, 'build' ),
2527
filename: 'ckeditor.js',
2628
libraryTarget: 'umd',
27-
libraryExport: 'default',
28-
library: buildConfig.moduleName
29+
libraryExport: 'default'
2930
},
3031

3132
optimization: {
@@ -46,7 +47,9 @@ module.exports = {
4647

4748
plugins: [
4849
new CKEditorWebpackPlugin( {
49-
language: buildConfig.config.language,
50+
// UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format.
51+
// When changing the built-in language, remember to also change it in the editor's configuration (src/ckeditor.js).
52+
language: 'en',
5053
additionalLanguages: 'all'
5154
} ),
5255
new webpack.BannerPlugin( {

0 commit comments

Comments
 (0)