Skip to content

Allow overriding configuration values

Adrián Pérez de Castro requested to merge aperezdc:config-defaults into master

When incorporating Gutenberg in other projects, it is desirable to allow overriding values from the configuration. This avoids the need to fork and hand-edit the configuration files in most cases. For example, with this commit applied it's possible to use WebPack in the following way:

npm install --save-dev gutenberg-web-type  # Install the normal version
cat > main.scss <<EOF
$theme: custom;
$custom-font-body: Palatino, serif;
$custom-font-headings: Impact, sans-serif;
@import '~gutenberg-web-type/src/style/gutenberg';
EOF
webpack  # Assumes that WebPack is properly configured to use
         # sass-loader + resolve-url-loader on *.scss files.

Notice how this completely avoids modifying the copy of Gutenberg installed using NPM.

Merge request reports