Skip to content

Removing more front-end files when not needed #411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading