block.json refinements

This commit is contained in:
Justin Foell
2021-02-26 16:26:07 -06:00
parent 1097392400
commit 37006f76c3
5 changed files with 10 additions and 14 deletions
+4
View File
@@ -118,6 +118,10 @@ On the WP-Strava settings page you cannot currently remove and add another athle
== Changelog ==
= Unreleased =
Revised `block.json` based on feedback from https://wordpress.org/plugins/developers/block-plugin-validator/
= 2.7.0 =
Add setting to choose API cache interval (1 hour / 15 minutes) https://wordpress.org/support/topic/decrease-update-time-for-group-recent-activities/
Move block type metadata to `block.json` for future discoverability.
+3 -4
View File
@@ -1,5 +1,4 @@
{
"apiVersion": 2,
"name": "wp-strava/activity",
"title": "Strava Activity",
"category": "embed",
@@ -25,7 +24,7 @@
"default": null
}
},
"editorScript": "wp-strava-block",
"editorStyle": "wp-strava-block-editor",
"style": "wp-strava-block"
"editorScript": "file:../../../build/index.js",
"editorStyle": "file:../../../build/editor.css",
"style": "file:../../../build/style.css"
}
-3
View File
@@ -6,7 +6,4 @@ import metadata from './block.json';
metadata.edit = edit;
metadata.save = () => null;
// Leaving this in place causes problems with the toolbar.
delete metadata.apiVersion;
registerBlockType( metadata.name, metadata );
+3 -4
View File
@@ -1,5 +1,4 @@
{
"apiVersion": 2,
"name": "wp-strava/route",
"title": "Strava Route",
"category": "embed",
@@ -25,7 +24,7 @@
"default": null
}
},
"editorScript": "wp-strava-block",
"editorStyle": "wp-strava-block-editor",
"style": "wp-strava-block"
"editorScript": "file:../../../build/index.js",
"editorStyle": "file:../../../build/editor.css",
"style": "file:../../../build/style.css"
}
-3
View File
@@ -6,7 +6,4 @@ import metadata from './block.json';
metadata.edit = edit;
metadata.save = () => null;
// Leaving this in place causes problems with the toolbar.
delete metadata.apiVersion;
registerBlockType( metadata.name, metadata );