From 192e3b23dd79cd0072d8e31de60ca520f8c4e49d Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Fri, 6 Jul 2018 17:21:48 +0200 Subject: [PATCH 1/3] Imported the version.js module from ckeditor5. --- src/version.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/version.js diff --git a/src/version.js b/src/version.js new file mode 100644 index 0000000..f3a09ea --- /dev/null +++ b/src/version.js @@ -0,0 +1,39 @@ +/** + * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +/** + * @module utils/version + */ + +/* global window, global */ + +import log from './log'; +import { version } from '../package.json'; + +const windowOrGlobal = typeof window === 'object' ? window : global; + +if ( windowOrGlobal.CKEDITOR_VERSION ) { + /** + * This error is thrown when the base {@link module:core/editor/editor~Editor `Editor`} + * class has been loaded twice (or more), a result of either: + * + * * the build containing two (or more) different versions of the {@link module:core/editor/editor~Editor `Editor`} + * class – make sure **all** packages in your {@glink builds/index build} which have + * `@ckeditor/ckeditor5-core` in their `package.json` [dependencies](https://docs.npmjs.com/files/package.json#dependencies) + * use the same version of the package, + * * two (or more) `ckeditor.js` builds loaded in the web page next to one another – check your web page for duplicated + * `