Skip to content

Commit

Permalink
Removing more front-end files when not needed (#411)
Browse files Browse the repository at this point in the history
* Clear out frontend files

* Fix frontend README

* Remove debug
  • Loading branch information
srtfisher authored Dec 31, 2024
1 parent 077faf1 commit c261487
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ must include both the major and minor version (e.g., `6.7`). For example:
```sh
npx wp-scripts packages-update --dist-tag=wp-6.7`
```
<!--/front-end-->

## Releasing the Plugin

Expand Down
10 changes: 10 additions & 0 deletions configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ function remove_assets_readme( bool $keep_contents, string $file = 'README.md' )
return;
}

if ( ! str_contains( $contents, '<!--front-end-->' ) ) {
echo "Unable to find the front-end assets section in {$file}.\n";
}

if ( ! str_contains( $contents, '<!--/front-end-->' ) ) {
echo "Unable to find the closing front-end assets section in {$file}.\n";
}

if ( $keep_contents ) {
$contents = str_replace( '<!--front-end-->', '', $contents );
$contents = str_replace( '<!--/front-end-->', '', $contents );
Expand Down Expand Up @@ -629,13 +637,15 @@ function enable_sqlite_testing(): void {
'.eslintignore',
'.eslintrc.json',
'.nvmrc',
'.npmrc',
'.stylelintrc.json',
'babel.config.js',
'jest.config.js',
'jsconfig.json',
'package.json',
'package-lock.json',
'tsconfig.json',
'tsconfig.eslint.json',
'entries/',
'blocks/',
'build/',
Expand Down

0 comments on commit c261487

Please sign in to comment.