-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creates a new package to hold the block.json and theme.json files that can then be synced to the SchemaStore. We want a package within Gutenberg so we can use the schemas internally to validate package files such as blocks in the block-library as well as generate documentation. Closes #35927
- Loading branch information
Showing
6 changed files
with
1,616 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. --> | ||
|
||
## Unreleased | ||
|
||
## 2.2.0 (2021-07-21) | ||
|
||
### Enhancement | ||
|
||
- Ensure that the warning for a given message is logged only once. | ||
|
||
## 2.1.0 (2021-05-20) | ||
|
||
## 2.0.0 (2021-05-14) | ||
|
||
### Breaking Changes | ||
|
||
- Drop support for Internet Explorer 11 ([#31110](https://github.com/WordPress/gutenberg/pull/31110)). Learn more at https://make.wordpress.org/core/2021/04/22/ie-11-support-phase-out-plan/. | ||
- Increase the minimum Node.js version to v12 matching Long Term Support releases ([#31270](https://github.com/WordPress/gutenberg/pull/31270)). Learn more at https://nodejs.org/en/about/releases/. | ||
|
||
## 1.4.0 (2021-03-17) | ||
|
||
## 1.1.0 (2020-04-15) | ||
|
||
### New feature | ||
|
||
- Include TypeScript type declarations ([#18942](https://github.com/WordPress/gutenberg/pull/18942)) | ||
|
||
## 1.0.0 (2020-02-04) | ||
|
||
Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Schemas | ||
|
||
The collection of schemas used in WordPress, including the `theme.json` schema, and `block.json` schemas. | ||
|
||
## Installation | ||
|
||
Install the module | ||
|
||
```shell | ||
$ npm install @wordpress/schemas --save-dev | ||
``` | ||
|
||
## Usage | ||
|
||
JSON schemas are used by code editors to offer tooltips, autocomplete, and validation. To use in your JSON file, add the `$schema` property to the top of the file with the value of the schema URL. | ||
|
||
For example, in your `block.json` file you would add: | ||
|
||
```json | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/WordPress/gutenberg/trunk/packages/schemas/json/block.json" | ||
} | ||
``` | ||
|
||
## SchemaStore.org | ||
|
||
[SchemaStore.org](https://schemastore.org) is an open collection of schemas, including the WordPress `theme.json` and `block.json` schemas. Any changes to schemas in this package should be mirror there. | ||
|
||
To update on SchemaStore, create a PR at their repository [SchemaStore/schemastore](https://github.com/SchemaStore/schemastore/). The files can be found in their reposiory at: | ||
|
||
- block.json: `src/schemas/json/block.json` | ||
- theme.json: `src/schemas/json/theme-v1.json` | ||
|
||
<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p> |
Oops, something went wrong.