@ryanwelcher/dynamic-block-template
Advanced tools
| # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
| name: Dynamic Block Template Package | ||
| on: | ||
| release: | ||
| types: [created] | ||
| jobs: | ||
| publish-npm: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: 16 | ||
| registry-url: https://registry.npmjs.org/ | ||
| - run: npm publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
+1
-1
| { | ||
| "name": "@ryanwelcher/dynamic-block-template", | ||
| "version": "1.2.1", | ||
| "version": "1.2.2", | ||
| "description": "A template for use with @wordpress/create-block to support dynamic blocks", | ||
@@ -5,0 +5,0 @@ "license": "GPL-2.0-or-later", |
+1
-11
| # Dynamic Block Template | ||
| This template will scaffold a plugin that is set up for registering dynamic block using the [`@wordpress/create-block`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/) tool. | ||
| It also provides integration with the `@wordpress/env` package for a local development solution. | ||
| ## Usage | ||
@@ -12,5 +9,3 @@ Run the following in the terminal of your choice: | ||
| The name of the plugin ( example-plugin in the example above) is used as both the name of the plugin and the name of the block being created. This is due to the current `@wordpress/create-block` tool expecting a single block per plugin. | ||
| ## Structure | ||
@@ -32,10 +27,5 @@ | ||
| .gitignore | ||
| .wp-env.json | ||
| {example-block}.php | ||
| package.json | ||
| package-lock.json | ||
| ``` | ||
| ### @wordpress/env setup | ||
| In order to use the `@wordpress/env`, you will need to add `"env": "wp-env"` to the scripts in package.json. | ||
| Please refer to the [`@wordpress/env` docs ](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) for details on requirements and usage. | ||
| ``` |
13
8.33%6863
-0.55%29
-25.64%