Skip to content

Commit

Permalink
Packages: Move Plugins module to packages
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Jun 8, 2018
1 parent 54d405a commit 089982b
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 9 deletions.
1 change: 1 addition & 0 deletions packages/plugins/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
12 changes: 11 additions & 1 deletion plugins/README.md → packages/plugins/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Plugins
# @wordpress/plugins

Plugins module for WordPress.

## Installation

Install the module

```bash
npm install @wordpress/plugins --save
```

### Plugins API

Expand Down
29 changes: 29 additions & 0 deletions packages/plugins/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "@wordpress/plugins",
"version": "1.0.0-alpha.1",
"description": "Plugins module for WordPress",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"keywords": [
"wordpress",
"plugins"
],
"homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/plugins/README.md",
"repository": {
"type": "git",
"url": "https://github.com/WordPress/gutenberg.git"
},
"bugs": {
"url": "https://github.com/WordPress/gutenberg/issues"
},
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@wordpress/element": "^1.0.0-alpha.1",
"@wordpress/hooks": "1.1.6",
"lodash": "4.17.5"
},
"publishConfig": {
"access": "public"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { map } from 'lodash';
/**
* WordPress dependencies
*/
import { Component } from '@wordpress/element';
import { Component, createElement } from '@wordpress/element';
import { addAction, removeAction } from '@wordpress/hooks';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { createContext, createHigherOrderComponent } from '@wordpress/element';
import { createContext, createHigherOrderComponent, createElement } from '@wordpress/element';

const { Consumer, Provider } = createContext( {
name: null,
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions test/unit/jest.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"rootDir": "../../",
"collectCoverageFrom": [
"(blocks|components|editor|utils|edit-post|viewport|plugins|core-blocks|nux)/**/*.js",
"(blocks|components|editor|utils|edit-post|viewport|core-blocks|nux)/**/*.js",
"packages/**/*.js"
],
"moduleNameMapper": {
"@wordpress\\/(blocks|components|editor|utils|edit-post|viewport|plugins|core-data|core-blocks|nux)$": "$1",
"@wordpress\\/(api-request|blob|core-data|data|date|dom|deprecated|element|postcss-themes)$": "packages/$1/src"
"@wordpress\\/(blocks|components|editor|utils|edit-post|viewport|core-data|core-blocks|nux)$": "$1",
"@wordpress\\/(api-request|blob|core-data|data|date|dom|deprecated|element|plugins|postcss-themes)$": "packages/$1/src"
},
"preset": "@wordpress/jest-preset-default",
"setupFiles": [
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,21 @@ const entryPointNames = [
'editor',
'utils',
'viewport',
'plugins',
'edit-post',
'core-blocks',
'nux',
];

const gutenbergPackages = [
'api-request',
'blob',
'core-data',
'data',
'date',
'deprecated',
'dom',
'element',
'api-request',
'core-data',
'plugins',
];

const wordPressPackages = [
Expand Down

0 comments on commit 089982b

Please sign in to comment.