Skip to content

Commit

Permalink
Include CSS files when copying files with Encore (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvandevijver authored and kunicmarko20 committed Mar 9, 2019
1 parent f5a1214 commit 384af9f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/installation.rst
Expand Up @@ -66,20 +66,24 @@ You can by running this command:
# if you are using Yarn as package manager
$ yarn add ckeditor@^4.0.0
Once installed, add the following lines to your Webpack Encore configuration file:
Once installed, add the following lines to your Webpack Encore configuration file (this excludes the samples directory from the ckeditor node module):

.. code-block:: javascript
// webpack.config.js
var path = require('path');
var Encore = require('@symfony/webpack-encore');
Encore
// ...
.copyFiles([
{from: './node_modules/ckeditor/', to: 'ckeditor/[path][name].[ext]', pattern: '/\.js$/'},
{from: './node_modules/ckeditor/', to: 'ckeditor/[path][name].[ext]', pattern: /\.(js|css)$/, includeSubdirectories: false},
{from: './node_modules/ckeditor/adapters', to: 'ckeditor/adapters/[path][name].[ext]'},
{from: './node_modules/ckeditor/lang', to: 'ckeditor/lang/[path][name].[ext]'},
{from: './node_modules/ckeditor/plugins', to: 'ckeditor/plugins/[path][name].[ext]'},
{from: './node_modules/ckeditor/skins', to: 'ckeditor/skins/[path][name].[ext]'}
])
.addLoader({test: /\.json$/i, include: [path.resolve(__dirname, 'node_modules/ckeditor')], loader: 'raw-loader', type: 'javascript/auto'})
;
Then, override the bundle's configuration to point to the new CKEditor path:
Expand Down

0 comments on commit 384af9f

Please sign in to comment.