Permalink
Browse files

Merge branch t/ckeditor5/545

Other: The build now defines the editor as its default export. This makes requiring the build easier when using AMD, CJS or ES6 modules. See ckeditor/ckeditor5#545.

BREAKING CHANGE: The build now defines a default export instead of named export. See ckeditor/ckeditor5#545.
  • Loading branch information...
Reinmar committed Sep 7, 2017
2 parents 4b89b48 + c98781a commit e5c7511f1f583ec3a394f336f075a3e875e00f12
Showing with 13 additions and 11 deletions.
  1. +2 −2 README.md
  2. +1 −1 build/ckeditor.js
  3. +1 −1 build/ckeditor.js.map
  4. +1 −1 ckeditor.js
  5. +1 −1 package.json
  6. +2 −2 tests/ckeditor.js
  7. +1 −1 tests/manual/ckeditor-cjs-version.js
  8. +1 −1 tests/manual/ckeditor.js
  9. +3 −1 webpack.config.js
@@ -47,10 +47,10 @@ And use it in your website:
Or in your JavaScript application:

```js
import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic/build/ckeditor';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic/build/ckeditor';
// Or using CommonJS verion:
// const ClassicEditor = require( '@ckeditor/ckeditor5-build-classic/build/ckeditor' ).ClassicEditor;
// const ClassicEditor = require( '@ckeditor/ckeditor5-build-classic/build/ckeditor' );
ClassicEditor
.create( document.querySelector( '#editor' ) )

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -18,7 +18,7 @@ import LinkPlugin from '@ckeditor/ckeditor5-link/src/link';
import ListPlugin from '@ckeditor/ckeditor5-list/src/list';
import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';

export class ClassicEditor extends ClassicEditorBase {}
export default class ClassicEditor extends ClassicEditorBase {}

ClassicEditor.build = {
plugins: [
@@ -22,7 +22,7 @@
"@ckeditor/ckeditor5-paragraph": "^0.9.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-dev-utils": "^3.0.0",
"@ckeditor/ckeditor5-dev-utils": "^4.0.0",
"@ckeditor/ckeditor5-dev-webpack-plugin": "^2.0.11",
"babel-minify-webpack-plugin": "^0.2.0",
"css-loader": "^0.28.5",
@@ -5,10 +5,10 @@

/* globals document */

import { ClassicEditor } from '../ckeditor';
import ClassicEditor from '../ckeditor';
import BaseClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';

describe( 'ClassicEditor', () => {
describe( 'ClassicEditor build', () => {
let editor, editorElement;

beforeEach( () => {
@@ -3,7 +3,7 @@
* For licensing, see LICENSE.md.
*/

const ClassicEditor = require( '../../build/ckeditor' ).ClassicEditor;
const ClassicEditor = require( '../../build/ckeditor' );

ClassicEditor.create( document.querySelector( '#editor' ) )
.then( editor => {
@@ -3,7 +3,7 @@
* For licensing, see LICENSE.md.
*/

import { ClassicEditor } from '../../build/ckeditor';
import ClassicEditor from '../../build/ckeditor';

ClassicEditor.create( document.querySelector( '#editor' ) )
.then( editor => {
@@ -22,7 +22,9 @@ module.exports = {
output: {
path: path.resolve( __dirname, 'build' ),
filename: 'ckeditor.js',
libraryTarget: 'umd'
libraryTarget: 'umd',
libraryExport: 'default',
library: buildConfig.moduleName
},

plugins: [

0 comments on commit e5c7511

Please sign in to comment.