Browse Source

Docs: Improved build docs and updated them to match the changes in ckeditor5-build-classic.

Piotrek Koszuliński 8 years ago
parent
commit
0edd50ba76

+ 7 - 3
docs/builds/guides/integration/basic-api.md

@@ -21,7 +21,7 @@ Most of the examples in the documentation use the `ClassicEditor` class, but thi
 
 Because builds are distributed as [UMD modules](https://github.com/umdjs/umd), these classes can be retrieved:
 
-* by a [CommonJS](http://wiki.commonjs.org/wiki/CommonJS)-compatible loader (e.g. [Webpack](https://webpack.js.org) or [Browserify](http://browserify.org/)),
+* by a [CommonJS](http://wiki.commonjs.org/wiki/CommonJS)-compatible loader (e.g. [webpack](https://webpack.js.org) or [Browserify](http://browserify.org/)),
 * by [RequireJS](http://requirejs.org/) (or any other AMD library),
 * from the global namespace if none of the above loaders is available.
 
@@ -39,6 +39,10 @@ require( '/(ckeditor path)/build/ckeditor.js', ClassicEditor => {
 
 // As a global.
 ClassicEditor.create; // [Function]
+
+// As an ES6 module (if using webpack or Rollup).
+import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic/build/ckeditor';
+ClassicEditor.create; // [Function]
 ```
 
 Depending on which build you are using, creating an editor in the page is then a breeze:
@@ -46,7 +50,7 @@ Depending on which build you are using, creating an editor in the page is then a
 In the HTML code:
 
 ```html
-<textarea id="text-editor">
+<textarea id="editor">
 	&lt;p&gt;Here goes the initial content of the editor.&lt;/p&gt;
 </textarea>
 ```
@@ -55,7 +59,7 @@ In the script:
 
 ```js
 ClassicEditor
-	.create( document.querySelector( '#text-editor' ) )
+	.create( document.querySelector( '#editor' ) )
 	.then( editor => {
 		console.log( editor );
 	} )

+ 8 - 4
docs/builds/guides/integration/installation.md

@@ -47,9 +47,9 @@ The script entry point for the build class will then be found at `node_modules/c
 
 The following are the main files available in all build distributions:
 
-* `build/ckeditor.js` &ndash; The main UMD distribution script, containing the editor core and all plugins. Compatible with ECMAScript 6 enabled browsers. A smaller download.
-* `build/ckeditor.compat.js` &ndash; The same as the above, for browsers not compatible with ES6.
-* `ckeditor.js` &ndash; The source entry point of the build. It can be used for complex bundling and development.
+* `build/ckeditor.js` &ndash; The main UMD distribution script, containing the editor and all plugins.
+* `ckeditor.js` &ndash; The source entry point of the build. It can be used for complex bundling and development. Based on it the `build/ckeditor.js` is created (by webpack).
+* `build-config.js` &ndash; The build configuration, based on which the `ckeditor.js` file is created.
 
 ## Loading the API
 
@@ -59,7 +59,11 @@ Once downloaded and installed in your application, it is time to make the API av
 <script src="/ckeditor/build/ckeditor.js"></script>
 ```
 
-For a more advanced setup, you may wish to bundle the CKEditor script with other scripts used by your application. See {@linkTODO Bundling} for more information about it.
+<info-box>
+	The `build/ckeditor.js` file is generated in the [UMD format](https://github.com/umdjs/umd) so you can also import it to your application if you use CommonJS modules (like in Node.js) or AMD modules (like in Require.js). Read more in the {@link builds/guides/integration/basic-api Basic API guide}.
+
+	Also, for a more advanced setup, you may wish to bundle the CKEditor script with other scripts used by your application. See {@linkTODO Bundling} for more information about it.
+</info-box>
 
 Once the CKEditor script is loaded, you can {@link builds/guides/integration/basic-api use the API} to create editors in your page.