Skip to content

Commit

Permalink
Config: add new package wordpress-block-editor-config to share defaul…
Browse files Browse the repository at this point in the history
…t WordPress block editor specific settings
  • Loading branch information
gwwar committed Mar 20, 2021
1 parent 1cba4c2 commit e867cff
Show file tree
Hide file tree
Showing 19 changed files with 254 additions and 108 deletions.
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1637,6 +1637,12 @@
"markdown_source": "../packages/wordcount/README.md",
"parent": "packages"
},
{
"title": "@wordpress/wordpress-block-editor-config",
"slug": "packages-wordpress-block-editor-config",
"markdown_source": "../packages/wordpress-block-editor-config/README.md",
"parent": "packages"
},
{
"title": "Data Module Reference",
"slug": "data",
Expand Down
14 changes: 13 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
"@wordpress/url": "file:packages/url",
"@wordpress/viewport": "file:packages/viewport",
"@wordpress/warning": "file:packages/warning",
"@wordpress/wordcount": "file:packages/wordcount"
"@wordpress/wordcount": "file:packages/wordcount",
"@wordpress/wordpress-block-editor-config": "file:packages/wordpress-block-editor-config"
},
"devDependencies": {
"@actions/core": "1.2.6",
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/blob": "file:../blob",
"@wordpress/blocks": "file:../blocks",
"@wordpress/components": "file:../components",
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ import '@wordpress/rich-text';
import './hooks';
export * from './components';
export * from './utils';
export * from './settings';
export { storeConfig, store } from './store';
export { SETTINGS_DEFAULTS } from './store/defaults';

This file was deleted.

1 change: 1 addition & 0 deletions packages/edit-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"@wordpress/media-utils": "file:../media-utils",
"@wordpress/notices": "file:../notices",
"@wordpress/url": "file:../url",
"@wordpress/wordpress-block-editor-config": "file:../wordpress-block-editor-config",
"classnames": "^2.2.5",
"lodash": "^4.17.19",
"rememo": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-navigation/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
__experimentalRegisterExperimentalCoreBlocks,
} from '@wordpress/block-library';
import { render } from '@wordpress/element';
import { __experimentalFetchLinkSuggestions as createFetchLinkSuggestions } from '@wordpress/block-editor';
import { __experimentalFetchLinkSuggestions as createFetchLinkSuggestions } from '@wordpress/wordpress-block-editor-config';

/**
* Internal dependencies
Expand Down
1 change: 1 addition & 0 deletions packages/edit-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@wordpress/plugins": "file:../plugins",
"@wordpress/primitives": "file:../primitives",
"@wordpress/url": "file:../url",
"@wordpress/wordpress-block-editor-config": "file:../wordpress-block-editor-config",
"classnames": "^2.2.5",
"downloadjs": "^1.4.7",
"file-saver": "^2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
__experimentalRegisterExperimentalCoreBlocks,
} from '@wordpress/block-library';
import { render } from '@wordpress/element';
import { __experimentalFetchLinkSuggestions as createFetchLinkSuggestions } from '@wordpress/block-editor';
import { __experimentalFetchLinkSuggestions as createFetchLinkSuggestions } from '@wordpress/wordpress-block-editor-config';

/**
* Internal dependencies
Expand Down
1 change: 1 addition & 0 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@wordpress/server-side-render": "file:../server-side-render",
"@wordpress/url": "file:../url",
"@wordpress/wordcount": "file:../wordcount",
"@wordpress/wordpress-block-editor-config": "file:../wordpress-block-editor-config",
"classnames": "^2.2.5",
"lodash": "^4.17.19",
"memize": "^1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { pick, defaultTo } from 'lodash';
import { Platform, useMemo } from '@wordpress/element';
import { useDispatch, useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { __experimentalFetchLinkSuggestions as createFetchLinkSuggestions } from '@wordpress/block-editor';
import { __experimentalFetchLinkSuggestions as createFetchLinkSuggestions } from '@wordpress/wordpress-block-editor-config';

/**
* Internal dependencies
Expand Down
1 change: 1 addition & 0 deletions packages/wordpress-block-editor-config/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
5 changes: 5 additions & 0 deletions packages/wordpress-block-editor-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. -->

### New Feature

- Initial version. New wordpress-block-editor-config package created to share common settings with WordPress Block Editors ([#29993](https://github.com/WordPress/gutenberg/pull/29993))
24 changes: 24 additions & 0 deletions packages/wordpress-block-editor-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# WordPress Block Editor Config

Package to share common settings for WordPress specific Block Editors.

## Installation

Install the module

```bash
npm install @wordpress/wordpress-block-editor --save
```

_This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for ES2015+ such as lower versions of IE then using [core-js](https://github.com/zloirock/core-js) or [@babel/polyfill](https://babeljs.io/docs/en/next/babel-polyfill) will add support for these methods. Learn more about it in [Babel docs](https://babeljs.io/docs/en/next/caveats)._

## API

<!-- START TOKEN(Autogenerated API docs) -->

Nothing to document.


<!-- END TOKEN(Autogenerated API docs) -->

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
36 changes: 36 additions & 0 deletions packages/wordpress-block-editor-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@wordpress/wordpress-block-editor-config",
"version": "1.0.0",
"description": "Common settings for WordPress Block Editors.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"keywords": [
"wordpress",
"wordpress-block-editor-config",
"block-editor-config",
"editor-config"
],
"homepage": "https://github.com/WordPress/gutenberg/tree/HEAD/packages/wordpress-block-editor-config/README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/WordPress/gutenberg.git",
"directory": "packages/wordpress-block-editor-config"
},
"bugs": {
"url": "https://github.com/WordPress/gutenberg/issues"
},
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.12.5",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/html-entities": "file:../html-entities",
"@wordpress/i18n": "file:../i18n",
"@wordpress/url": "file:../url"
},
"publishConfig": {
"access": "public"
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as __experimentalFetchLinkSuggestions } from './defaults/__experimental-fetch-link-suggestions';
export { default as __experimentalFetchLinkSuggestions } from './settings/__experimental-fetch-link-suggestions';
Loading

0 comments on commit e867cff

Please sign in to comment.