forked from wpengine/faustjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: registerFaustBlock helper (wpengine#1528)
* Feat: registerFaustBlock helper * Chore: Fix cli build * Build: Fix TS build errors. * Chore: Add changeset. * Build: Fix compiler options for node types. * Build: Update tsconfig.json to fix test type errors. * Build: Fix eslint issues. * Build: Restore original tsconfig in cli. * Build: (faustwp-core) Fixes tests type checks. * Chore: Changesets. * Refactor: Use appropriate types for edit,save func
- Loading branch information
Showing
23 changed files
with
6,359 additions
and
16,983 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,5 @@ | ||
--- | ||
'@faustwp/core': patch | ||
--- | ||
|
||
Chore: Fixes import order style lint error. |
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,5 @@ | ||
--- | ||
'@faustjs/next': patch | ||
--- | ||
|
||
Chore: Fixes import order style lint error. |
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,5 @@ | ||
--- | ||
'@faustwp/cli': patch | ||
--- | ||
|
||
Adds reference to parent tsconfig.json and fixes type resolution errors. |
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,19 @@ | ||
--- | ||
'@faustwp/block-editor-utils': patch | ||
--- | ||
|
||
Feat: Add `registerFaustBlock`` helper that wraps `edit` and `save` functions used to register new blocks in Gutenberg. | ||
|
||
Usage: | ||
|
||
```js | ||
import metadata from './block.json'; | ||
|
||
import MyFirstBlock from './MyFirstBlock'; | ||
import {registerFaustBlock} from '@faustwp/block-editor-utils' | ||
|
||
import Edit from './edit'; | ||
import save from './save'; | ||
|
||
registerFaustBlock(MyFirstBlock, {blockJson: metadata, editFn: Edit, saveFn: save}) | ||
``` |
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
Oops, something went wrong.