Skip to content

feat: expose style dependencies and buildFinished events - #13

Merged
davidpett merged 1 commit into
stencil-community:mainfrom
davidpett:feat/style-deps-and-build-events
May 29, 2026
Merged

davidpett merged 1 commit into
stencil-community:mainfrom
davidpett:feat/style-deps-and-build-events

Conversation

@davidpett

Copy link
Copy Markdown
Collaborator

Summary

  • Add getComponentStyleDependencies() returning byComponent, byStyle, and resolved globalStyle maps, rebuilt after each successful Stencil compile via TypeScript AST over component sources (styleUrl, styleUrls array, and mode object).
  • Add stencilBuildEvents (buildFinished with CompilerBuildResults, buildError) forwarded from BuildQueue so consumers can invalidate all dist output after a project-wide rebuild without mtime polling.
  • Add typescript as a runtime dependency for AST parsing; include unit tests and workspace ESLint-on-save settings aligned with @antfu/eslint-config.

Motivation

Enables @stencil/storybook-plugin (and similar tooling) to drop fragile regex extraction of style paths and post-transform dist polling.

Test plan

  • pnpm exec vitest run test/
  • pnpm build

Add getComponentStyleDependencies() for component/style file graphs and
stencilBuildEvents so downstream tools can react after project-wide Stencil
rebuilds without regex or dist mtime polling.
@davidpett
davidpett force-pushed the feat/style-deps-and-build-events branch from f6dda8c to 128f29b Compare May 29, 2026 15:15

@christian-bromann christian-bromann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @davidpett 👍

I made you a maintainer, so feel free to merge and publish updates without approval from me moving forward.

@davidpett
davidpett merged commit eefb28d into stencil-community:main May 29, 2026
10 checks passed
@davidpett
davidpett deleted the feat/style-deps-and-build-events branch May 29, 2026 20:45
@davidpett

Copy link
Copy Markdown
Collaborator Author

@christian-bromann that is great, thanks! Although I am not able to release via the action. I get an npm auth error: https://github.com/stencil-community/unplugin-stencil/actions/runs/26661703777/job/78585587398

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.

2 participants