Skip to content

Commit

Permalink
Updated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2ciek committed Jul 3, 2018
1 parent 48e37ef commit 0b4790e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
14 changes: 3 additions & 11 deletions docs/builds/guides/integration/advanced-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ In order to start developing CKEditor 5 you will require:

## Bundler

CKEditor 5 is currently built using [webpack](https://webpack.js.org) (>=3.x.x). All builds, examples and demos are generated using this bundler. It should also be possible to build CKEditor using other bundlers (if they are configured properly), such as [Rollup](https://github.com/rollup/rollup) or [Browserify](http://browserify.org/), but these setups are not officially supported yet. Also, the [`@ckeditor/ckeditor5-dev-webpack-plugin`](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-webpack-plugin) that allows to localize the editor is only available for webpack. More work on this subject will be done after v1.0.0.
CKEditor 5 is currently built using [webpack](https://webpack.js.org) (>=4.x.x). All builds, examples and demos are generated using this bundler. It should also be possible to build CKEditor using other bundlers (if they are configured properly), such as [Rollup](https://github.com/rollup/rollup) or [Browserify](http://browserify.org/), but these setups are not officially supported yet. Also, the [`@ckeditor/ckeditor5-dev-webpack-plugin`](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-webpack-plugin) that allows to localize the editor is only available for webpack. More work on this subject will be done after v1.0.0.

Therefore, **a prerequisite to this guide is that you are using webpack as your build tool**.

<info-box warning>
Unfortunately, at the moment of writing this note, [webpack@4.x causes issues](https://github.com/ckeditor/ckeditor5-dev/issues/371) so the recommended version is webpack@3.x.
</info-box>

## Scenario 1: Integrating existing builds

This is the simplest scenario. It assumes that you want to use {@link builds/guides/overview#available-builds one of the existing builds} "as-is" (you can, of course, still {@link builds/guides/integration/configuration configure the editor}). It also gives the fastest build times.
Expand Down Expand Up @@ -106,16 +102,12 @@ npm install --save \
postcss-loader \
raw-loader \
style-loader \
webpack@^3.11.0 \
webpack-sources@1.0.1
webpack@^4.12.2 \
webpack-cli@^3.0.8 \
```

You may also want to install [`babel-minify-webpack-plugin`](https://github.com/webpack-contrib/babel-minify-webpack-plugin) if you plan to minify ES6+ code.

<info-box warning>
Unfortunately, at the moment of writing this note, [webpack@4.x causes issues](https://github.com/ckeditor/ckeditor5-dev/issues/371). Hence, webpack@3.x is used in the scenario above. Additionally, webpack-sources@1.0.1 [is needed due to another issue](https://github.com/ckeditor/ckeditor5/issues/658).
</info-box>

### Webpack configuration

You can now configure webpack. There are a couple of things that you need to take care of when building CKEditor:
Expand Down
13 changes: 5 additions & 8 deletions docs/framework/guides/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ The framework is made of several [npm packages](https://npmjs.com). To install i
* [Node.js](https://nodejs.org/en/) >= 6.0.0
* npm 4.x (**note:** using npm 5 [is not recommended](https://github.com/npm/npm/issues/16991))

Besides Node.js and npm you also need [webpack@3.x](https://webpack.js.org) with a few additional packages to use the framework. They are needed to bundle the source code. Read more about building CKEditor 5 in the {@link builds/guides/integration/advanced-setup CKEditor 5 Builds Advanced setup} guide.

<info-box warning>
Unfortunately, at the moment of writing this note, [webpack@4.x causes issues](https://github.com/ckeditor/ckeditor5-dev/issues/371).
</info-box>
Besides Node.js and npm you also need [webpack@4.x](https://webpack.js.org) with a few additional packages to use the framework. They are needed to bundle the source code. Read more about building CKEditor 5 in the {@link builds/guides/integration/advanced-setup CKEditor 5 Builds Advanced setup} guide.

<!-- TODO replace the link above when the Framework will get its own building guide. -->

Expand All @@ -33,7 +29,8 @@ npm install --save \
postcss-loader \
raw-loader \
style-loader \
webpack@^3.11.0
webpack@^4.12.2
webpack-cli@^3.0.8
```

The minimal webpack configuration needed to enable building CKEditor 5 is:
Expand Down Expand Up @@ -148,7 +145,7 @@ You can now run webpack to build the application. To do that, call the `webpack`
```

<info-box>
You can also install webpack globally (using `npm install -g`) and run it via a globally available `webpack`.
You can also install `webpack-cli` globally (using `npm install -g`) and run it via a globally available `webpack`.

Alternatively, you can add it as an [npm script](https://docs.npmjs.com/misc/scripts):

Expand All @@ -164,7 +161,7 @@ You can now run webpack to build the application. To do that, call the `webpack`
npm run build
```

npm adds `./node_modules/.bin/` to the `PATH` automatically, so in this case you do not need to install webpack globally.
npm adds `./node_modules/.bin/` to the `PATH` automatically, so in this case you do not need to install `webpack-cli` globally.
</info-box>

If everything worked correctly, you should see:
Expand Down

0 comments on commit 0b4790e

Please sign in to comment.