Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Added default configuration parameter for Config #127

Merged
merged 5 commits into from
Mar 2, 2017
Merged

Added default configuration parameter for Config #127

merged 5 commits into from
Mar 2, 2017

Conversation

pomek
Copy link
Member

@pomek pomek commented Mar 2, 2017

Suggested merge commit message (convention)

Feature: Added default configuration parameter for Config. Closes ckeditor/ckeditor5#4936.


Additional information

src/config.js Outdated

// Set default configuration.
if ( defaultConfigurations ) {
this._setObjectToTarget( this._config, defaultConfigurations, true );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not define()? It's a role of this method to set the default values.

Copy link
Member Author

@pomek pomek Mar 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9bd0d4b.

@Reinmar
Copy link
Member

Reinmar commented Mar 2, 2017

Please add a test for a deeper config objects.

@pomek
Copy link
Member Author

pomek commented Mar 2, 2017

Done in 4783f38.

tests/config.js Outdated
first: 1,
second: 2
},
'b.foo.first': 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not like this, like:

b: {
   foo: {
       first: 1
   }
}

This is supported just by coincident :D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2e7eab7. :D

@Reinmar
Copy link
Member

Reinmar commented Mar 2, 2017

You forgot about API docs but I'll add them. R+ for the rest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config – an easy way to load the default config
2 participants