Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Commit

Permalink
Other: Changed the build structure. TODO. Closes ckeditor/ckeditor5#1038
Browse files Browse the repository at this point in the history
.
  • Loading branch information
Reinmar committed Jul 11, 2018
1 parent 9ae3846 commit 4512b35
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 109 deletions.
9 changes: 0 additions & 9 deletions bin/build-ckeditor.sh

This file was deleted.

18 changes: 0 additions & 18 deletions bin/create-entry-file.js

This file was deleted.

61 changes: 0 additions & 61 deletions build-config.js

This file was deleted.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@
"url": "https://github.com/ckeditor/ckeditor5-build-balloon.git"
},
"scripts": {
"build": "npm run create-entry-file && npm run build-ckeditor",
"create-entry-file": "node bin/create-entry-file.js",
"build-ckeditor": "sh bin/build-ckeditor.sh",
"build": "webpack --mode production",
"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"
}
}
28 changes: 14 additions & 14 deletions src/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

import BalloonEditorBase from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
import EssentialsPlugin from '@ckeditor/ckeditor5-essentials/src/essentials';
import UploadadapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
import UploadAdapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
import BlockquotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import EasyimagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import BlockQuotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import EasyImagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';
import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
import ImagestylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
import ImagetoolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
import ImageuploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
import ImageCaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
import ImageStylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
import ImageToolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
import ImageUploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
import LinkPlugin from '@ckeditor/ckeditor5-link/src/link';
import ListPlugin from '@ckeditor/ckeditor5-list/src/list';
import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';
Expand All @@ -25,18 +25,18 @@ export default class BalloonEditor extends BalloonEditorBase {}

BalloonEditor.builtinPlugins = [
EssentialsPlugin,
UploadadapterPlugin,
UploadAdapterPlugin,
AutoformatPlugin,
BoldPlugin,
ItalicPlugin,
BlockquotePlugin,
EasyimagePlugin,
BlockQuotePlugin,
EasyImagePlugin,
HeadingPlugin,
ImagePlugin,
ImagecaptionPlugin,
ImagestylePlugin,
ImagetoolbarPlugin,
ImageuploadPlugin,
ImageCaptionPlugin,
ImageStylePlugin,
ImageToolbarPlugin,
ImageUploadPlugin,
LinkPlugin,
ListPlugin,
ParagraphPlugin
Expand Down
11 changes: 7 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const webpack = require( 'webpack' );
const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' );
const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
const UglifyJsWebpackPlugin = require( 'uglifyjs-webpack-plugin' );
const buildConfig = require( './build-config' );

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

output: {
// The name under which the editor will be exported.
library: 'BalloonEditor',

path: path.resolve( __dirname, 'build' ),
filename: 'ckeditor.js',
libraryTarget: 'umd',
libraryExport: 'default',
library: buildConfig.moduleName
libraryExport: 'default'
},

optimization: {
Expand All @@ -46,7 +47,9 @@ module.exports = {

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

0 comments on commit 4512b35

Please sign in to comment.