Skip to content

build: add a generated helper function to load examples #26968

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 2 commits into from
Apr 21, 2023

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 20, 2023

This new helper removes the examples' reliance on internal APF structure and naming. Currently the examples hard code the ECMAScript version into the application which can and will change over time. The helper function also removes the need to use Webpack-specific magic comments in the documentation website to prevent unwanted files from being loaded.
The recent updates to the APF for v16 required several manual changes to both the examples and the documentation site which will no longer be needed in the future. This change retains the existing functionality to allow for the documentation site to be updated with the new functionality. Once updated, additional cleanup is possible to remove the then unused loading functionality.

This new helper removes the examples' reliance on internal APF structure and naming.
Currently the examples hard code the ECMAScript version into the application
which can and will change over time. The helper function also removes the
need to use Webpack-specific magic comments in the documentation website to
prevent unwanted files from being loaded.
The recent updates to the APF for v16 required several manual changes to both the
examples and the documentation site which will no longer be needed in the future.
This change retains the existing functionality to allow for the documentation site
to be updated with the new functionality. Once updated, additional cleanup is possible
to remove the then unused loading functionality.
@clydin clydin added the target: rc This PR is targeted for the next release-candidate label Apr 20, 2023
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Apr 20, 2023
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 20, 2023
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

conceptually LGTM.

@clydin clydin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 21, 2023
@angular-robot angular-robot bot merged commit 524c243 into angular:main Apr 21, 2023
angular-robot bot pushed a commit that referenced this pull request Apr 21, 2023
* build: add a generated helper function to load examples

This new helper removes the examples' reliance on internal APF structure and naming.
Currently the examples hard code the ECMAScript version into the application
which can and will change over time. The helper function also removes the
need to use Webpack-specific magic comments in the documentation website to
prevent unwanted files from being loaded.
The recent updates to the APF for v16 required several manual changes to both the
examples and the documentation site which will no longer be needed in the future.
This change retains the existing functionality to allow for the documentation site
to be updated with the new functionality. Once updated, additional cleanup is possible
to remove the then unused loading functionality.

* fixup! build: add a generated helper function to load examples

(cherry picked from commit 524c243)
@clydin clydin deleted the examples/decouple-from-apf branch April 21, 2023 14:11
clydin added a commit to clydin/material.angular.io that referenced this pull request Apr 21, 2023
Loading the Material examples now uses the newly provide `loadExample` helper
function and avoids the need to manually specify APF directory structures which
can change as new ECMAScript versions are used.

Components PR: angular/components#26968
clydin added a commit to clydin/material.angular.io that referenced this pull request Apr 21, 2023
Loading the Material examples now uses the newly provide `loadExample` helper
function and avoids the need to manually specify APF directory structures which
can change as new ECMAScript versions are used.

Components PR: angular/components#26968
clydin added a commit to clydin/material.angular.io that referenced this pull request Apr 21, 2023
Loading the Material examples now uses the newly provide `loadExample` helper
function and avoids the need to manually specify APF directory structures which
can change as new ECMAScript versions are used.

Components PR: angular/components#26968
clydin added a commit to clydin/material.angular.io that referenced this pull request Apr 21, 2023
Loading the Material examples now uses the newly provide `loadExample` helper
function and avoids the need to manually specify APF directory structures which
can change as new ECMAScript versions are used.

Components PR: angular/components#26968
devversion pushed a commit to angular/material.angular.io that referenced this pull request Apr 21, 2023
Loading the Material examples now uses the newly provide `loadExample` helper
function and avoids the need to manually specify APF directory structures which
can change as new ECMAScript versions are used.

Components PR: angular/components#26968
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants