Skip to content

Commit

Permalink
Docs: Add information about polyfills for each package that needs them
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Aug 24, 2018
1 parent 9d62bc7 commit 70d46ad
Show file tree
Hide file tree
Showing 64 changed files with 564 additions and 481 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ When creating a new package you need to provide at least the following:
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime-corejs2": "7.0.0-beta.56"
"@babel/runtime-corejs2": "7.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
868 changes: 439 additions & 429 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"rememo": "3.0.0"
},
"devDependencies": {
"@babel/core": "7.0.0-rc.1",
"@babel/runtime-corejs2": "7.0.0-rc.1",
"@babel/core": "7.0.0-rc.2",
"@babel/runtime-corejs2": "7.0.0-rc.2",
"@wordpress/babel-plugin-import-jsx-pragma": "file:packages/babel-plugin-import-jsx-pragma",
"@wordpress/babel-plugin-makepot": "file:packages/babel-plugin-makepot",
"@wordpress/babel-preset-default": "file:packages/babel-preset-default",
Expand Down
2 changes: 2 additions & 0 deletions packages/a11y/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Install the module
npm install @wordpress/a11y --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## speak

Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions. This module is inspired by the `speak` function in wp-a11y.js
Expand Down
2 changes: 1 addition & 1 deletion packages/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/dom-ready": "file:../dom-ready"
},
"publishConfig": {
Expand Down
2 changes: 2 additions & 0 deletions packages/api-fetch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Install the module
npm install @wordpress/api-fetch --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Usage

```js
Expand Down
2 changes: 1 addition & 1 deletion packages/api-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/hooks": "file:../hooks",
"@wordpress/i18n": "file:../i18n"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/autop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Install the module
npm install @wordpress/autop --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

### Usage

Import the desired function(s) from `@wordpress/autop`:
Expand Down
2 changes: 1 addition & 1 deletion packages/autop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1"
"@babel/runtime": "7.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/babel-plugin-import-jsx-pragma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1"
"@babel/runtime": "7.0.0-rc.2"
},
"devDependencies": {
"@babel/core": "7.0.0-rc.1",
"@babel/plugin-syntax-jsx": "7.0.0-rc.1"
"@babel/core": "7.0.0-rc.2",
"@babel/plugin-syntax-jsx": "7.0.0-rc.2"
},
"peerDependencies": {
"@babel/core": "7.0.0-rc.1"
"@babel/core": "7.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/babel-plugin-makepot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.10"
},
"devDependencies": {
"@babel/core": "7.0.0-rc.1",
"@babel/traverse": "7.0.0-rc.1"
"@babel/core": "7.0.0-rc.2",
"@babel/traverse": "7.0.0-rc.2"
},
"peerDependencies": {
"@babel/core": "7.0.0-rc.1"
"@babel/core": "7.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
14 changes: 7 additions & 7 deletions packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
},
"main": "index.js",
"dependencies": {
"@babel/plugin-proposal-async-generator-functions": "7.0.0-rc.1",
"@babel/plugin-proposal-object-rest-spread": "7.0.0-rc.1",
"@babel/plugin-transform-react-jsx": "7.0.0-rc.1",
"@babel/plugin-transform-runtime": "7.0.0-rc.1",
"@babel/preset-env": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.1",
"@babel/plugin-proposal-async-generator-functions": "7.0.0-rc.2",
"@babel/plugin-proposal-object-rest-spread": "7.0.0-rc.2",
"@babel/plugin-transform-react-jsx": "7.0.0-rc.2",
"@babel/plugin-transform-runtime": "7.0.0-rc.2",
"@babel/preset-env": "7.0.0-rc.2",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/browserslist-config": "file:../browserslist-config",
"babel-core": "^7.0.0-bridge.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-rc.1"
"@babel/core": "^7.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1"
"@babel/runtime": "7.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Install the module
npm install @wordpress/block-library --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Usage

```js
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/autop": "file:../autop",
"@wordpress/blob": "file:../blob",
Expand Down
10 changes: 10 additions & 0 deletions packages/blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ blog.
The following documentation outlines steps you as a developer will need to
follow to add your own custom blocks to WordPress's editor interfaces.

## Installation

Install the module

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

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Getting Started

If you're not already accustomed to working with JavaScript in your WordPress
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/autop": "file:../autop",
"@wordpress/blob": "file:../blob",
"@wordpress/block-serialization-spec-parser": "file:../block-serialization-spec-parser",
Expand Down
2 changes: 2 additions & 0 deletions packages/components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Install the module
npm install @wordpress/components --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Usage

Within Gutenberg, these components can be accessed by importing from the `components` root directory:
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/compose": "file:../compose",
Expand Down
2 changes: 2 additions & 0 deletions packages/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Install the module
npm install @wordpress/compose --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Usage

```js
Expand Down
2 changes: 1 addition & 1 deletion packages/compose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/element": "file:../element",
"@wordpress/is-shallow-equal": "file:../is-shallow-equal",
"lodash": "^4.17.10"
Expand Down
2 changes: 2 additions & 0 deletions packages/core-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Install the module
npm install @wordpress/core-data --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Example

Below is an example of a component which simply renders a list of authors:
Expand Down
2 changes: 1 addition & 1 deletion packages/core-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/data": "file:../data",
"@wordpress/url": "file:../url",
Expand Down
2 changes: 1 addition & 1 deletion packages/custom-templated-path-webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"escape-string-regexp": "^1.0.5"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Install the module
npm install @wordpress/data --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Registering a Store

Use the `registerStore` function to add your own store to the centralized data registry. This function accepts two arguments: a name to identify the module, and an object with values describing how your state is represented, modified, and accessed. At a minimum, you must provide a reducer function describing the shape of your state and how it changes in response to actions dispatched to the store.
Expand Down
2 changes: 1 addition & 1 deletion packages/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/compose": "file:../compose",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/element": "file:../element",
Expand Down
2 changes: 2 additions & 0 deletions packages/date/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ Install the module
npm install @wordpress/date --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
2 changes: 1 addition & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"moment": "^2.22.1",
"moment-timezone": "^0.5.16"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/deprecated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Install the module
npm install @wordpress/deprecated --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Usage

```js
Expand Down
2 changes: 1 addition & 1 deletion packages/deprecated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1"
"@babel/runtime": "7.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 2 additions & 0 deletions packages/dom-ready/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Install the module
npm install @wordpress/dom-ready --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

### Usage

```JS
Expand Down
2 changes: 1 addition & 1 deletion packages/dom-ready/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1"
"@babel/runtime": "7.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"element-closest": "^2.0.2",
"lodash": "^4.17.10"
},
Expand Down
14 changes: 14 additions & 0 deletions packages/editor/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Editor

Building blocks for WordPress editors.

## Installation

Install the module

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

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## How it works

The logic flow concerning the editor includes: inferring a block representation of the post content (parsing); describing the state of a post (representation); rendering of the post to the DOM (rendering); attaching controls to manipulate the content a.k.a blocks (UI).

![Diagram](https://docs.google.com/drawings/d/1iuownt5etcih7rMMvPvh0Mny8zUA1Z28saxjxaWmfJ0/pub?w=1234&h=453)
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"@wordpress/a11y": "file:../a11y",
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/blob": "file:../blob",
Expand Down
2 changes: 2 additions & 0 deletions packages/element/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Install the module
npm install @wordpress/element --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

## Usage

Let's render a customized greeting into an empty element:
Expand Down
2 changes: 1 addition & 1 deletion packages/element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "7.0.0-rc.1",
"@babel/runtime": "7.0.0-rc.2",
"lodash": "^4.17.10",
"react": "^16.4.1",
"react-dom": "^16.4.1"
Expand Down
3 changes: 3 additions & 0 deletions packages/hooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Install the module
npm install @wordpress/hooks --save
```

_This package assumes that your code will run in an ES5 environment. If you're using an environment that has limited or no support for ES5 such as lower versions of IE then using [@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)._

### Usage

In your JavaScript project, use hooks as follows:
```javascript
import { createHooks } from '@wordpress/hooks';
Expand Down
Loading

0 comments on commit 70d46ad

Please sign in to comment.