Skip to content

Commit

Permalink
WDSBT-20 Add blocks folder to ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
khleomix committed Jun 18, 2024
1 parent 1f8626c commit 8b7577f
Show file tree
Hide file tree
Showing 11 changed files with 380 additions and 216 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
blocks
build
node_modules
vendor
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ vendor/

# theme
build/
blocks/

#tests
pa11y-ci-report/
Expand Down
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
blocks
build
node_modules
vendor
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
blocks/
build/
node_modules/
vendor/
Expand Down
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
blocks/
build/
vendor/
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"wp-coding-standards/wpcs": "^3.1.0"
},
"scripts": {
"phpcs": "./vendor/bin/phpcs --report=summary,source",
"phpcs": "./vendor/bin/phpcs --report=full,source",
"phpcs-fix": "./vendor/bin/phpcbf --report=summary,source"
}
}
8 changes: 4 additions & 4 deletions inc/hooks/enqueue-block-stylesheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function enqueue_block_styles() {
* @return array An array containing information about block stylesheets.
*/
function get_block_stylesheets() {
$css_dir = get_stylesheet_directory() . '/assets/css';
$css_dir = get_stylesheet_directory() . '/build/css';
$exclude_stylesheets = array( 'style.css', 'style-rtl.css' );

$css_files = array_diff(
Expand All @@ -101,10 +101,10 @@ function ( $css_file ) use ( $css_dir ) {

$block_name = $matches[1] . '/' . $matches[2];

return [
return array(
'path' => $css_file,
'src' => str_replace( $css_dir, get_stylesheet_directory_uri() . '/assets/css', $css_file ),
];
'src' => str_replace( $css_dir, get_stylesheet_directory_uri() . '/build/css', $css_file ),
);
},
$css_files
);
Expand Down
32 changes: 0 additions & 32 deletions inc/setup/preload-scripts.php

This file was deleted.

Loading

0 comments on commit 8b7577f

Please sign in to comment.