Skip to content

Commit

Permalink
Packages: Make usage of core-data explicit (#8911)
Browse files Browse the repository at this point in the history
* Packages: Make usage of `core-data` explicit

* Editor: Explicitly import all packages which expose used stores

* Edit post: Add store imports to ensure other packages are loaded

* Add missing viewport import
  • Loading branch information
gziolo authored Aug 24, 2018
1 parent d7eb4f6 commit 5632f68
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
4 changes: 4 additions & 0 deletions edit-post/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/**
* WordPress dependencies
*/
import '@wordpress/core-data';
import '@wordpress/editor';
import '@wordpress/nux';
import '@wordpress/viewport';
import { registerCoreBlocks } from '@wordpress/block-library';
import { render, unmountComponentAtNode } from '@wordpress/element';
import { dispatch } from '@wordpress/data';
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

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

4 changes: 2 additions & 2 deletions packages/block-library/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Core Blocks
# Block library

Core Blocks for the WordPress editor.
Block library for the WordPress editor.

## Installation

Expand Down
5 changes: 2 additions & 3 deletions packages/block-library/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@wordpress/block-library",
"version": "1.0.0",
"description": "Core Blocks of the WordPress editor.",
"description": "Block library for the WordPress editor.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"keywords": [
Expand All @@ -20,8 +20,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.0.0-beta.52",
"@wordpress/api-fetch": "file:../api-fetch",
"@babel/runtime-corejs2": "7.0.0-beta.56",
"@wordpress/autop": "file:../autop",
"@wordpress/blob": "file:../blob",
"@wordpress/blocks": "file:../blocks",
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import '@wordpress/core-data';
import {
registerBlockType,
setDefaultBlockName,
Expand Down
11 changes: 11 additions & 0 deletions packages/editor/src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* WordPress dependencies
*/
import '@wordpress/blocks';
import '@wordpress/core-data';
import '@wordpress/nux';
import '@wordpress/viewport';

/**
* Internal dependencies
*/
import './store';
import './hooks';

Expand Down

0 comments on commit 5632f68

Please sign in to comment.