Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new lint commands #25

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
14 changes: 6 additions & 8 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -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,
},
};
67 changes: 39 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <https://github.com/Tonejs/Tone.js/>

### Splendid Grand Piano (Acoustic Piano)
* License: Public Domain
* Source: https://github.com/sfzinstruments/SplendidGrandPiano

- License: Public Domain
- Source: <https://github.com/sfzinstruments/SplendidGrandPiano>

### 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: <https://github.com/sfzinstruments/GregSullivan.E-Pianos>

### tonewheel organ sound samples by hammondman (Organ)
* License: CC0-1.0
* Source: https://freesound.org/people/hammondman/packs/18844/

- License: CC0-1.0
- Source: <https://freesound.org/people/hammondman/packs/18844/>

### 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: <https://github.com/sfzinstruments/karoryfer.shinyguitar>

### Pastabass by Karoryfer Samples (Electric Bass)
* License: CC-BY-4.0
* Source: https://github.com/sfzinstruments/karoryfer.pastabass

- License: CC-BY-4.0
- Source: <https://github.com/sfzinstruments/karoryfer.pastabass>

### Meatbass by Karoryfer Samples (Acoustic Bass)
* License: CC-BY-4.0
* Source: https://github.com/sfzinstruments/karoryfer.meatbass

- License: CC-BY-4.0
- Source: <https://github.com/sfzinstruments/karoryfer.meatbass>

### 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: <https://github.com/sfzinstruments/karoryfer.bear-sax>

### 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: <https://github.com/sgossner/VSCO-2-CE>

### SVG Repo (Block Icon)
* License: CC0
* Source: https://www.svgrepo.com/svg/47923/piano-keys-part

- License: CC0
- Source: <https://www.svgrepo.com/svg/47923/piano-keys-part>

### Free SVG (Block Background Image)
* License: Public Domain
* Source: https://freesvg.org/wg-3

- License: Public Domain
- Source: <https://freesvg.org/wg-3>

### Google Fonts (Banner Font)
* License: Apache License 2.0
* Source: https://fonts.google.com/specimen/Yellowtail

- License: Apache License 2.0
- Source: <https://fonts.google.com/specimen/Yellowtail>

## Author

Expand Down
65 changes: 38 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -32,15 +34,24 @@
"prettier": "npm:[email protected]",
"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"
}
}
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading