Skip to content

feat/implement asset build - #88

Open
YvetteNikolov wants to merge 10 commits into
mainfrom
feat/implement-asset-build
Open

YvetteNikolov wants to merge 10 commits into
mainfrom
feat/implement-asset-build

Conversation

@YvetteNikolov

Copy link
Copy Markdown

Wordt nog toegelicht

Copilot AI lite review requested due to automatic review settings September 9, 2026 13:54
@YvetteNikolov
YvetteNikolov requested a review from a team as a code owner September 9, 2026 13:54
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Composer package changes
Prod Packages Operation Base Target Link License
yard/wp-package-installer New - v1.0.1 Compare

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

It includes invalid/incorrect tooling configuration (notably package.json and VS Code language-scoped settings) and inconsistent built CSS output that won’t match the component markup.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds an asset build pipeline (pnpm + @wordpress/scripts + custom webpack config) to the package skeleton, including an example Blade component, admin assets, and a dynamic Gutenberg block scaffold, while removing the previous “Example” service/test scaffolding.

Changes:

  • Introduces webpack/pnpm/TS tooling and adds compiled assets under public/.
  • Adds asset-related PHP services/providers plus an example Blade component and dynamic block renderer/views.
  • Updates configure.php to optionally include/remove all asset-build tooling and related files.
File summaries
File Description
webpack.config.js Adds custom webpack config to build scripts/styles/blocks into public/.
tsconfig.json Adds TS config for assets build output.
tests/ExampleTest.php Removes old Example service tests.
tests/Console/ExampleCommandTest.php Removes old example command test.
tests/Components/ExampleComponentTest.php Adds Blade component render test (with mocked asset service).
src/SkeletonPackageServiceProvider.php Registers view components, commands, and asset-related providers.
src/Package.php Adds package name constant used by installer helpers.
src/Example.php Removes old Example service.
src/Console/ExampleCommand.php Simplifies example command output.
src/Components/ExampleComponent.php Adds example Blade component that enqueues an asset.
src/BlockServiceProvider.php Registers block metadata collection and dynamic render callback; remaps block asset URLs.
src/Blocks/ExampleBlock.php Adds dynamic block renderer returning a Blade view.
src/AssetService.php Adds helper to enqueue JS/CSS assets based on .asset.php metadata.
src/AdminServiceProvider.php Enqueues admin assets on admin_enqueue_scripts.
resources/views/example.blade.php Removes old example view.
resources/views/components/example-component.blade.php Adds Blade view for example component.
resources/views/blocks/example-block.blade.php Adds Blade view for dynamic block render output.
resources/styles/example-component.css Adds example component CSS source.
resources/styles/admin.css Adds admin CSS source.
resources/scripts/example-component.ts Adds example component entrypoint importing CSS.
resources/scripts/admin.ts Adds admin entrypoint importing CSS.
resources/blocks/example-dynamic/view.js Adds block view script source.
resources/blocks/example-dynamic/style.scss Adds block frontend style source.
resources/blocks/example-dynamic/index.js Adds block editor script source.
resources/blocks/example-dynamic/icon.jsx Adds block icon source.
resources/blocks/example-dynamic/editor.scss Adds block editor style source.
resources/blocks/example-dynamic/edit.js Adds block edit component source.
resources/blocks/example-dynamic/block.json Adds block metadata definition.
README.md Documents the optional asset build behavior in configure.php.
public/example-dynamic/view.js Adds compiled block view script.
public/example-dynamic/view.asset.php Adds compiled block view asset metadata.
public/example-dynamic/style-index.css Adds compiled block frontend CSS.
public/example-dynamic/style-index-rtl.css Adds compiled block frontend RTL CSS.
public/example-dynamic/index.js Adds compiled block editor JS.
public/example-dynamic/index.css Adds compiled block editor CSS.
public/example-dynamic/index.asset.php Adds compiled block editor asset metadata.
public/example-dynamic/index-rtl.css Adds compiled block editor RTL CSS.
public/example-dynamic/block.json Adds copied/compiled block metadata in build output.
public/example-component.js Adds compiled example component JS.
public/example-component.css Adds compiled example component CSS.
public/example-component.asset.php Adds compiled example component asset metadata.
public/example-component-rtl.css Adds compiled example component RTL CSS.
public/blocks-manifest.php Adds generated blocks manifest for metadata collection registration.
public/admin.js Adds compiled admin JS.
public/admin.css Adds compiled admin CSS.
public/admin.asset.php Adds compiled admin asset metadata.
public/admin-rtl.css Adds compiled admin RTL CSS.
pnpm-workspace.yaml Adds pnpm workspace constraints for dependency freshness.
package.json Adds npm tooling config for asset build/lint/format (currently contains issues).
eslint.config.cjs Adds ESLint config entrypoint.
configure.php Adds optional inclusion/removal of asset build tooling and related sources.
composer.lock Adds yard/wp-package-installer dependency lock changes.
composer.json Switches package type to wordpress-package and enables installer plugin/repo.
.vscode/settings.json Adds editor settings for formatting/linting (currently contains invalid language keys).
.stylelintrc.cjs Adds Stylelint config entrypoint.
.prettierrc.cjs Adds Prettier config entrypoint.
.gitignore Ignores node_modules/.
Review details

Files not reviewed (1)

  • public/example-dynamic/index.js: Generated file
  • Files reviewed: 53/59 changed files
  • Comments generated: 6
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json Outdated
Comment thread .vscode/settings.json
Comment on lines +5 to +8
"[scss][css][postcss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": { "source.fixAll.prettier": "explicit", "source.fixAll.stylelint": "explicit" }
},
Comment thread .vscode/settings.json
Comment on lines +9 to +13
"[javascript][typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": { "source.fixAll.prettier": "explicit", "source.fixAll.eslint": "explicit" },
"editor.formatOnPaste": false
},
Comment thread package.json Outdated
@@ -0,0 +1 @@
.skeleton-example-component{border:1px solid #000}
@@ -0,0 +1 @@
.skeleton-example-component{border:1px solid #000}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants