Skip to content

Commit 5d58589

Browse files
authored
Merge pull request #104 from alleyinteractive/remove-scaffold
Remove all references to the alley scaffolder
2 parents 51b6e96 + 0a20fa1 commit 5d58589

File tree

8 files changed

+41
-44
lines changed

8 files changed

+41
-44
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Merge Develop to Scaffold Branch
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- remove-scaffold
8+
9+
jobs:
10+
merge-develop-to-scaffold:
11+
name: merge develop to scaffold
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Merge develop to scaffold
16+
shell: bash
17+
env:
18+
DEVELOP_BRANCH: develop
19+
SCAFFOLD_BRANCH: scaffold
20+
21+
TOKEN: ${{ secrets.GH_TOKEN }}
22+
run: |
23+
git config --global user.name "$GITHUB_ACTOR"
24+
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
25+
26+
echo "Cloning alleyinteractive/create-wordpress-plugin..."
27+
git clone --recursive --quiet https://$TOKEN@github.com/alleyinteractive/create-wordpress-plugin.git create-wordpress-plugin -b $SCAFFOLD_BRANCH
28+
cd create-wordpress-plugin
29+
30+
git fetch origin $DEVELOP_BRANCH
31+
git fetch origin $SCAFFOLD_BRANCH
32+
33+
git merge origin/$DEVELOP_BRANCH --no-edit
34+
git push -u origin $SCAFFOLD_BRANCH

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ happen when running development or production builds.
7474
Run `composer test` to run tests against PHPUnit and the PHP code in the plugin.
7575

7676
### The `entries` directory and entry points
77+
7778
All directories created in the `entries` directory can serve as entry points and will be compiled with [@wordpress/scripts](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/README.md#scripts) into the `build` directory with an accompanied `index.asset.php` asset map.
7879

7980
#### Enqueuing Entry Points

blocks/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Custom blocks in this directory can be created by running the `create-block` script. For understanding how blocks are architected, built, and enqueued refer to the [Block Editor Handbook | Anatomy of a Block](https://developer.wordpress.org/block-editor/getting-started/create-block/block-anatomy/).
44

5-
### Scaffold a block with `create-block`
5+
## Scaffold a block with `create-block`
66

77
1. In the root directory run `npm run create-block`
88
2. Follow the prompts to create a custom block.
@@ -55,5 +55,6 @@ Block attributes should be defined in the `block.json` file. [Learn more about b
5555

5656
Running `npm run build` will compile the JavaScript and copy the PHP files to a directory in the `build` folder using `@wordpress/scripts`. The blocks will be enqueued via `block.json` after block registration. The block `index.php` file will be read by the `load_scripts()` function found in the `function.php` file.
5757

58-
### Customize the block scaffolding templates.
58+
## Customize the block scaffolding templates
59+
5960
The `bin/create-block` script and associated `.mustache` files replace default files included in the `@wordpress/create-block` script for scaffolding blocks. To learn more about external project templates and to customize different variations of scaffolded blocks refer to the [External Project Templates documentation](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/packages-create-block-external-template/) in the block editor handbook.

config/post-meta.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

configure.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ function delete_files( string|array $paths ) {
264264

265265
echo "\nWelcome friend to alleyinteractive/create-wordpress-plugin! 😀\nLet's setup your WordPress Plugin 🚀\n\n";
266266

267+
// Always delete the 'merge-develop-to-scaffold.yml' file (this is never used in a scaffolded plugins).
268+
delete_files( '.github/workflows/merge-develop-to-scaffold.yml' );
269+
267270
$author_name = ask(
268271
question: 'Author name?',
269272
default: $args['author_name'] ?? run( 'git config user.name' ),

functions.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"prestylelint": "check-node-version --package",
2929
"pretest:watch": "check-node-version --package",
3030
"pretest": "check-node-version --package",
31-
"scaffold": "scaffold dir ./scaffold --theme=./",
3231
"start": "wp-scripts start --webpack-copy-php --webpack-src-dir=blocks",
3332
"stylelint:fix": "stylelint --fix \"**/*.scss\"",
3433
"stylelint": "stylelint \"**/*.scss\" --allow-empty-input",

plugin.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ function() {
4848
require_once __DIR__ . '/vendor/autoload.php';
4949

5050
// Load the plugin's main files.
51-
require_once __DIR__ . '/functions.php';
5251
require_once __DIR__ . '/src/assets.php';
5352
require_once __DIR__ . '/src/meta.php';
5453

0 commit comments

Comments
 (0)