Skip to content

Commit

Permalink
Removes existing build directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
tommusrhodus committed Jul 16, 2024
1 parent d619cc6 commit 78eff90
Show file tree
Hide file tree
Showing 15 changed files with 6 additions and 163 deletions.
43 changes: 0 additions & 43 deletions dynamic-table-of-contents/build/block.json

This file was deleted.

1 change: 0 additions & 1 deletion dynamic-table-of-contents/build/index.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion dynamic-table-of-contents/build/index.js

This file was deleted.

38 changes: 0 additions & 38 deletions dynamic-table-of-contents/build/render.php

This file was deleted.

1 change: 0 additions & 1 deletion dynamic-table-of-contents/build/style-index.css

This file was deleted.

1 change: 0 additions & 1 deletion dynamic-table-of-contents/build/view.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion dynamic-table-of-contents/build/view.js

This file was deleted.

20 changes: 0 additions & 20 deletions sibling-pages-list/build/block.json

This file was deleted.

1 change: 0 additions & 1 deletion sibling-pages-list/build/index.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion sibling-pages-list/build/index.js

This file was deleted.

49 changes: 0 additions & 49 deletions sibling-pages-list/build/render.php

This file was deleted.

12 changes: 6 additions & 6 deletions special-projects-blocks-monorepo.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Plugin Name: Special Projects Blocks Monorepo
* Description: Aggregates the blocks we have created.
* Plugin Name: WordPress.com Special Projects Blocks Monorepo
* Description: Auto-loads any blocks in the monorepo that have a build directory. Run `npm run build` in the block plugin directory you're working on to create the build directory and auto-load that block plugin.
* Requires at least: 6.1
* Requires PHP: 8.0
* Version: 0.3
* Author: WordPress Special Projects Team
* Version: 1.0.0
* Author: WordPress.com Special Projects Team
* Author URI: https://wpspecialprojects.wordpress.com/
* Update URI: https://github.com/a8cteam51/special-projects-blocks-monorepo/
* License: GPL-2.0-or-later
Expand All @@ -17,7 +17,7 @@


/**
* Load all existing blocks within subfolders
* Load all existing blocks within subfolders that have build directories.
* It assumes that the PHP file name is exactly like the directory name + .php.
*
* Example: /dynamic-table-of-contents/dynamic-table-of-contents.php
Expand All @@ -26,7 +26,7 @@ function load_add_downloaded_blocks() {
$dirs = glob( __DIR__ . '/*', GLOB_ONLYDIR );

foreach ( $dirs as $dir ) {
if ( file_exists( $dir . DIRECTORY_SEPARATOR . basename( $dir ) . '.php' ) ) {
if ( file_exists( $dir . DIRECTORY_SEPARATOR . basename( $dir ) . '.php' ) && is_dir( $dir . DIRECTORY_SEPARATOR . 'build' ) ) {
include $dir . DIRECTORY_SEPARATOR . basename( $dir ) . '.php';
}
}
Expand Down

0 comments on commit 78eff90

Please sign in to comment.