diff --git a/.prettierrc.js b/.prettierrc.js
index 36ae5bb..45e7f99 100644
--- a/.prettierrc.js
+++ b/.prettierrc.js
@@ -8,11 +8,7 @@ const config = {
bracketSpacing: true,
parenSpacing: true,
parser: 'typescript',
- // Set new property instead of jsxBracketSameLine
bracketSameLine: false,
-}
-
-// Remove deprecated property
-delete config.jsxBracketSameLine
+};
module.exports = config;
diff --git a/.stylelintrc.js b/.stylelintrc.js
index 8ecb98a..d4f5c97 100644
--- a/.stylelintrc.js
+++ b/.stylelintrc.js
@@ -1,10 +1,8 @@
module.exports = {
- extends: [
- '@wordpress/stylelint-config/scss',
- ],
+ extends: [ '@wordpress/stylelint-config/scss' ],
rules: {
- "no-descending-specificity": null,
- "font-weight-notation": null,
- "selector-class-pattern": null,
- }
-}
+ 'no-descending-specificity': null,
+ 'font-weight-notation': null,
+ 'selector-class-pattern': null,
+ },
+};
diff --git a/README.md b/README.md
index 5b2cb83..88cff8d 100644
--- a/README.md
+++ b/README.md
@@ -18,61 +18,72 @@ Note: The keys are optimized for the QWERTY keyboard and may not map correctly o
## How to build
-```
-$ npm install
-
-$ npm run build
+```sh
+npm install
+npm run build
```
## Resources, Audio Samples
### Tone.js (Web Audio framework)
-* License: MIT License
-* Source: https://github.com/Tonejs/Tone.js/
+
+- License: MIT License
+- Source:
### Splendid Grand Piano (Acoustic Piano)
-* License: Public Domain
-* Source: https://github.com/sfzinstruments/SplendidGrandPiano
+
+- License: Public Domain
+- Source:
### Greg Sullivan's E-Pianos (Electric Piano1, 2)
-* License: CC-BY-3.0
-* Source: https://github.com/sfzinstruments/GregSullivan.E-Pianos
+
+- License: CC-BY-3.0
+- Source:
### tonewheel organ sound samples by hammondman (Organ)
-* License: CC0-1.0
-* Source: https://freesound.org/people/hammondman/packs/18844/
+
+- License: CC0-1.0
+- Source:
### Shinyguitar by Karoryfer Samples (Electric Guitar, Acoustic Guitar)
-* License: CC-BY-4.0
-* Source: https://github.com/sfzinstruments/karoryfer.shinyguitar
+
+- License: CC-BY-4.0
+- Source:
### Pastabass by Karoryfer Samples (Electric Bass)
-* License: CC-BY-4.0
-* Source: https://github.com/sfzinstruments/karoryfer.pastabass
+
+- License: CC-BY-4.0
+- Source:
### Meatbass by Karoryfer Samples (Acoustic Bass)
-* License: CC-BY-4.0
-* Source: https://github.com/sfzinstruments/karoryfer.meatbass
+
+- License: CC-BY-4.0
+- Source:
### Bear Sax by Karoryfer Samples (Sax)
-* License: CC-BY-4.0
-* Source: https://github.com/sfzinstruments/karoryfer.bear-sax
+
+- License: CC-BY-4.0
+- Source:
### VS Chamber Orchestra (Flute, Harp, Muted Trumpet, Violin, Xylophone)
-* License: CC0-1.0
-* Source: https://github.com/sgossner/VSCO-2-CE
+
+- License: CC0-1.0
+- Source:
### SVG Repo (Block Icon)
-* License: CC0
-* Source: https://www.svgrepo.com/svg/47923/piano-keys-part
+
+- License: CC0
+- Source:
### Free SVG (Block Background Image)
-* License: Public Domain
-* Source: https://freesvg.org/wg-3
+
+- License: Public Domain
+- Source:
### Google Fonts (Banner Font)
-* License: Apache License 2.0
-* Source: https://fonts.google.com/specimen/Yellowtail
+
+- License: Apache License 2.0
+- Source:
## Author
diff --git a/package.json b/package.json
index 5772c87..2ff67ea 100644
--- a/package.json
+++ b/package.json
@@ -1,23 +1,25 @@
{
"name": "piano-block",
+ "version": "2.3.0",
+ "description": "WordPress custom block plugin that allows you to play a variety of tones using the piano keyboard.",
"author": "Aki Hamano",
- "license": "GPL-2.0+",
- "scripts": {
- "wp-env": "wp-env",
- "open": "wp-env start && opener http://localhost:8888",
- "stop": "wp-env stop",
- "start": "wp-scripts start",
- "start:hot": "wp-scripts start --hot",
- "build": "wp-scripts build",
- "lint": "npm run lint:css && npm run lint:js && npm run lint:types && npm run lint:php",
- "lint:css": "wp-scripts lint-style",
- "lint:js": "wp-scripts lint-js",
- "lint:php": "composer lint",
- "lint:types": "tsc",
- "format": "wp-scripts format ./src",
- "test": "npm run lint && npm run test:e2e",
- "test:e2e": "wp-scripts test-playwright",
- "test:e2e:debug": "wp-scripts test-playwright --debug"
+ "license": "GPL-2.0-or-later",
+ "keywords": ["gutenberg", "audio", "music", "piano"],
+ "homepage": "https://github.com/t-hamano/piano-block",
+ "repository": "git+https://github.com/t-hamano/piano-block.git",
+ "bugs": {
+ "url": "https://github.com/t-hamano/piano-block/issues"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=8.0.0"
+ },
+ "volta": {
+ "node": "16.18.0",
+ "npm": "8.19.2"
+ },
+ "dependencies": {
+ "tone": "^14.7.77"
},
"devDependencies": {
"@types/wordpress__block-editor": "^11.5.6",
@@ -32,15 +34,24 @@
"prettier": "npm:wp-prettier@3.0.3",
"typescript": "^5.2.2"
},
- "dependencies": {
- "tone": "^14.7.77"
- },
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
- "volta": {
- "node": "16.18.0",
- "npm": "8.19.2"
+ "scripts": {
+ "wp-env": "wp-env",
+ "open": "wp-env start && opener http://localhost:8888",
+ "stop": "wp-env stop",
+ "start": "wp-scripts start",
+ "start:hot": "wp-scripts start --hot",
+ "build": "wp-scripts build",
+ "check-licenses": "wp-scripts check-licenses",
+ "lint": "npm run lint:css && npm run lint:js && npm run lint:types && npm run lint:php && npm run lint:md:docs && npm run lint:pkg-json",
+ "lint:css": "wp-scripts lint-style",
+ "lint:js": "wp-scripts lint-js",
+ "lint:types": "tsc",
+ "lint:php": "composer lint",
+ "lint:md:docs": "wp-scripts lint-md-docs",
+ "lint:pkg-json": "wp-scripts lint-pkg-json",
+ "format": "wp-scripts format ./src",
+ "test": "npm run lint && npm run test:e2e",
+ "test:e2e": "wp-scripts test-playwright",
+ "test:e2e:debug": "wp-scripts test-playwright --debug"
}
}
diff --git a/src/index.d.ts b/src/index.d.ts
index 8506aa2..b719040 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -6,7 +6,7 @@ import type { BlockAttributes } from './constants';
// Global variables output by wp_localize_script
export interface PianoBlockVars {
assetsUrl: string;
- settings: BlockAttributes
+ settings: BlockAttributes;
}
declare global {